Skip to content

Commit

Permalink
Upgrade coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Aug 24, 2024
1 parent b6ebf0e commit cd4706d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"require-dev": {
"ext-xdebug": "*",
"aplus/coding-standard": "^2.1",
"aplus/coding-standard": "^2.8",
"ergebnis/composer-normalize": "^2.25",
"jetbrains/phpstorm-attributes": "^1.0",
"phpmd/phpmd": "^2.13",
Expand Down
14 changes: 7 additions & 7 deletions src/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public function __construct(
int | string $currentPage,
int | string $itemsPerPage,
int $totalItems,
Language $language = null,
string $url = null
?Language $language = null,
?string $url = null
) {
if ($language) {
$this->setLanguage($language);
Expand Down Expand Up @@ -186,7 +186,7 @@ protected function setTotalItems(int $totalItems) : static
*
* @return static
*/
public function setLanguage(Language $language = null) : static
public function setLanguage(?Language $language = null) : static
{
$this->language = $language ?? new Language();
$this->language->addDirectory(__DIR__ . '/Languages');
Expand Down Expand Up @@ -286,7 +286,7 @@ public function getQuery() : string
*
* @return static
*/
public function setAllowedQueries(array | null $allowed) : static
public function setAllowedQueries(?array $allowed) : static
{
$this->setUrl($this->oldUrl, $allowed);
return $this;
Expand All @@ -303,13 +303,13 @@ protected function prepareUrl() : static
}

/**
* @param string|URL $currentPageUrl
* @param URL|string $currentPageUrl
* @param array<string>|null $allowedQueries List of queries, an empty array
* to allow only the default or null to allow all
*
* @return static
*/
public function setUrl(string | URL $currentPageUrl, array $allowedQueries = null) : static
public function setUrl(URL | string $currentPageUrl, ?array $allowedQueries = null) : static
{
$currentPageUrl = $currentPageUrl instanceof URL
? clone $currentPageUrl
Expand Down Expand Up @@ -529,7 +529,7 @@ public function getWithUrl() : array
*
* @return string
*/
public function render(string $view = null) : string
public function render(?string $view = null) : string
{
$filename = $this->getView($view ?? $this->getDefaultView());
\ob_start();
Expand Down

0 comments on commit cd4706d

Please sign in to comment.