]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Entity.php
Applied another round of static analysis updates
[bookstack] / app / Entities / Models / Entity.php
index 2b6f85d24ceff1f9b5b05954bbbe52c820bf8590..0eb402284498e568a521929d6c6c46eb1a9598b2 100644 (file)
@@ -121,11 +121,11 @@ abstract class Entity extends Model implements Sluggable, Favouritable, Viewable
             return true;
         }
 
-        if (($entity->isA('chapter') || $entity->isA('page')) && $this->isA('book')) {
+        if (($entity instanceof BookChild) && $this instanceof Book) {
             return $entity->book_id === $this->id;
         }
 
-        if ($entity->isA('page') && $this->isA('chapter')) {
+        if ($entity instanceof Page && $this instanceof Chapter) {
             return $entity->chapter_id === $this->id;
         }