]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Entity.php
Cleaned up some user/image areas of the app
[bookstack] / app / Entities / Models / Entity.php
index f764ad16efb8cf8f94a44f38aaccbccb33cdd642..e681a4e22f1f2691f9e05b75f2b1ffd56bfd7098 100644 (file)
@@ -205,12 +205,12 @@ abstract class Entity extends Ownable
     }
 
     /**
-     * Get entity type.
-     * @return mixed
+     * Get the entity type as a simple lowercase word.
      */
-    public static function getType()
+    public static function getType(): string
     {
-        return strtolower(static::getClassName());
+        $className = array_slice(explode('\\', static::class), -1, 1)[0];
+        return strtolower($className);
     }
 
     /**