6
6
use BookStack \Entities \Models \Bookshelf ;
7
7
use BookStack \Entities \Models \Chapter ;
8
8
use BookStack \Entities \Models \Entity ;
9
- use BookStack \Entities \Models \HasCoverImage ;
10
9
use BookStack \Entities \Models \Page ;
11
10
use BookStack \Entities \Repos \BookRepo ;
12
11
use BookStack \Entities \Repos \BookshelfRepo ;
@@ -34,9 +33,9 @@ class EntityProvider
34
33
];
35
34
36
35
/**
37
- * Get an un-fetched page from the system.
36
+ * Get an unfetched page from the system.
38
37
*/
39
- public function page (callable $ queryFilter = null ): Page
38
+ public function page (callable | null $ queryFilter = null ): Page
40
39
{
41
40
/** @var Page $page */
42
41
$ page = Page::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['page ' ])->first ();
@@ -64,9 +63,9 @@ public function templatePage(): Page
64
63
}
65
64
66
65
/**
67
- * Get an un-fetched chapter from the system.
66
+ * Get an unfetched chapter from the system.
68
67
*/
69
- public function chapter (callable $ queryFilter = null ): Chapter
68
+ public function chapter (callable | null $ queryFilter = null ): Chapter
70
69
{
71
70
/** @var Chapter $chapter */
72
71
$ chapter = Chapter::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['chapter ' ])->first ();
@@ -80,9 +79,9 @@ public function chapterHasPages(): Chapter
80
79
}
81
80
82
81
/**
83
- * Get an un-fetched book from the system.
82
+ * Get an unfetched book from the system.
84
83
*/
85
- public function book (callable $ queryFilter = null ): Book
84
+ public function book (callable | null $ queryFilter = null ): Book
86
85
{
87
86
/** @var Book $book */
88
87
$ book = Book::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['book ' ])->first ();
@@ -101,9 +100,9 @@ public function bookHasChaptersAndPages(): Book
101
100
}
102
101
103
102
/**
104
- * Get an un-fetched shelf from the system.
103
+ * Get an unfetched shelf from the system.
105
104
*/
106
- public function shelf (callable $ queryFilter = null ): Bookshelf
105
+ public function shelf (callable | null $ queryFilter = null ): Bookshelf
107
106
{
108
107
/** @var Bookshelf $shelf */
109
108
$ shelf = Bookshelf::query ()->when ($ queryFilter , $ queryFilter )->whereNotIn ('id ' , $ this ->fetchCache ['bookshelf ' ])->first ();
0 commit comments