@@ -106,8 +106,8 @@ public function __construct(
106106 int | string $ currentPage ,
107107 int | string $ itemsPerPage ,
108108 int $ totalItems ,
109- Language $ language = null ,
110- string $ url = null
109+ ? Language $ language = null ,
110+ ? string $ url = null
111111 ) {
112112 if ($ language ) {
113113 $ this ->setLanguage ($ language );
@@ -186,7 +186,7 @@ protected function setTotalItems(int $totalItems) : static
186186 *
187187 * @return static
188188 */
189- public function setLanguage (Language $ language = null ) : static
189+ public function setLanguage (? Language $ language = null ) : static
190190 {
191191 $ this ->language = $ language ?? new Language ();
192192 $ this ->language ->addDirectory (__DIR__ . '/Languages ' );
@@ -286,7 +286,7 @@ public function getQuery() : string
286286 *
287287 * @return static
288288 */
289- public function setAllowedQueries (array | null $ allowed ) : static
289+ public function setAllowedQueries (? array $ allowed ) : static
290290 {
291291 $ this ->setUrl ($ this ->oldUrl , $ allowed );
292292 return $ this ;
@@ -303,13 +303,13 @@ protected function prepareUrl() : static
303303 }
304304
305305 /**
306- * @param string| URL $currentPageUrl
306+ * @param URL|string $currentPageUrl
307307 * @param array<string>|null $allowedQueries List of queries, an empty array
308308 * to allow only the default or null to allow all
309309 *
310310 * @return static
311311 */
312- public function setUrl (string | URL $ currentPageUrl , array $ allowedQueries = null ) : static
312+ public function setUrl (URL | string $ currentPageUrl , ? array $ allowedQueries = null ) : static
313313 {
314314 $ currentPageUrl = $ currentPageUrl instanceof URL
315315 ? clone $ currentPageUrl
@@ -529,7 +529,7 @@ public function getWithUrl() : array
529529 *
530530 * @return string
531531 */
532- public function render (string $ view = null ) : string
532+ public function render (? string $ view = null ) : string
533533 {
534534 $ filename = $ this ->getView ($ view ?? $ this ->getDefaultView ());
535535 \ob_start ();
0 commit comments