]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SiblingFetcher.php
Fixes for CodeStyle vol.2
[bookstack] / app / Entities / Tools / SiblingFetcher.php
index 6964fa2e62419e111531cfbb006c008cfc6fb8a0..e9dad0e134f4f0629182e064e97f68d8b9193328 100644 (file)
@@ -1,4 +1,6 @@
-<?php namespace BookStack\Entities\Tools;
+<?php
+
+namespace BookStack\Entities\Tools;
 
 use BookStack\Entities\EntityProvider;
 use BookStack\Entities\Models\Book;
@@ -7,13 +9,12 @@ use Illuminate\Support\Collection;
 
 class SiblingFetcher
 {
-
     /**
      * Search among the siblings of the entity of given type and id.
      */
     public function fetch(string $entityType, int $entityId): Collection
     {
-        $entity = (new EntityProvider)->get($entityType)->visible()->findOrFail($entityId);
+        $entity = (new EntityProvider())->get($entityType)->visible()->findOrFail($entityId);
         $entities = [];
 
         // Page in chapter
@@ -29,7 +30,7 @@ class SiblingFetcher
         // Book
         // Gets just the books in a shelf if shelf is in context
         if ($entity->isA('book')) {
-            $contextShelf = (new ShelfContext)->getContextualShelfForBook($entity);
+            $contextShelf = (new ShelfContext())->getContextualShelfForBook($entity);
             if ($contextShelf) {
                 $entities = $contextShelf->visibleBooks()->get();
             } else {