66use BookStack \Entities \Models \Bookshelf ;
77use BookStack \Entities \Models \Chapter ;
88use BookStack \Entities \Models \Entity ;
9- use BookStack \Entities \Models \HasCoverImage ;
109use BookStack \Entities \Models \Page ;
1110use BookStack \Entities \Repos \BookRepo ;
1211use BookStack \Entities \Repos \BookshelfRepo ;
@@ -34,9 +33,9 @@ class EntityProvider
3433 ];
3534
3635 /**
37- * Get an un-fetched page from the system.
36+ * Get an unfetched page from the system.
3837 */
39- public function page (callable $ queryFilter = null ): Page
38+ public function page (callable | null $ queryFilter = null ): Page
4039 {
4140 /** @var Page $page */
4241 $ page = Page::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['page ' ])->first ();
@@ -64,9 +63,9 @@ public function templatePage(): Page
6463 }
6564
6665 /**
67- * Get an un-fetched chapter from the system.
66+ * Get an unfetched chapter from the system.
6867 */
69- public function chapter (callable $ queryFilter = null ): Chapter
68+ public function chapter (callable | null $ queryFilter = null ): Chapter
7069 {
7170 /** @var Chapter $chapter */
7271 $ chapter = Chapter::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['chapter ' ])->first ();
@@ -80,9 +79,9 @@ public function chapterHasPages(): Chapter
8079 }
8180
8281 /**
83- * Get an un-fetched book from the system.
82+ * Get an unfetched book from the system.
8483 */
85- public function book (callable $ queryFilter = null ): Book
84+ public function book (callable | null $ queryFilter = null ): Book
8685 {
8786 /** @var Book $book */
8887 $ book = Book::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['book ' ])->first ();
@@ -101,9 +100,9 @@ public function bookHasChaptersAndPages(): Book
101100 }
102101
103102 /**
104- * Get an un-fetched shelf from the system.
103+ * Get an unfetched shelf from the system.
105104 */
106- public function shelf (callable $ queryFilter = null ): Bookshelf
105+ public function shelf (callable | null $ queryFilter = null ): Bookshelf
107106 {
108107 /** @var Bookshelf $shelf */
109108 $ shelf = Bookshelf::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['bookshelf ' ])->first ();
0 commit comments