mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 16:53:11 +08:00
Update to PHP coding standard 2.4.0
This commit is contained in:
@@ -13,7 +13,7 @@ use function rtrim;
|
||||
|
||||
class NotFoundType
|
||||
{
|
||||
private function __construct(private readonly ?VisitType $type)
|
||||
private function __construct(private readonly VisitType|null $type)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user