Skip to content

Commit cd4706d

Browse files
committed
Upgrade coding standard
1 parent b6ebf0e commit cd4706d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"require-dev": {
4444
"ext-xdebug": "*",
45-
"aplus/coding-standard": "^2.1",
45+
"aplus/coding-standard": "^2.8",
4646
"ergebnis/composer-normalize": "^2.25",
4747
"jetbrains/phpstorm-attributes": "^1.0",
4848
"phpmd/phpmd": "^2.13",

Diff for: src/Pager.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)