Update to PHP coding standard 2.4.0

This commit is contained in:
Alejandro Celaya
2024-10-28 22:27:30 +01:00
parent 93a277a94d
commit 3f1d61e01e
192 changed files with 465 additions and 432 deletions

View File

@@ -13,7 +13,7 @@ use function rtrim;
class NotFoundType
{
private function __construct(private readonly ?VisitType $type)
private function __construct(private readonly VisitType|null $type)
{
}

View File

@@ -40,7 +40,7 @@ readonly class NotFoundRedirectHandler implements MiddlewareInterface
private function resolveDomainSpecificRedirect(
UriInterface $currentUri,
NotFoundType $notFoundType,
): ?ResponseInterface {
): ResponseInterface|null {
$domain = $this->domainService->findByAuthority($currentUri->getAuthority());
if ($domain === null) {
return null;

View File

@@ -23,7 +23,7 @@ class NotFoundTemplateHandler implements RequestHandlerInterface
private Closure $readFile;
public function __construct(?callable $readFile = null)
public function __construct(callable|null $readFile = null)
{
$this->readFile = $readFile ? Closure::fromCallable($readFile) : fn (string $file) => file_get_contents($file);
}