[ecs] little hack for the ecs

[CI SKIP]
This commit is contained in:
lubiana 2023-01-26 20:24:38 +00:00 committed by gitbot
parent c75fd2f10f
commit af5b329878
No known key found for this signature in database

View file

@ -10,7 +10,10 @@ use Lubian\AttributeMagic\Infrastructure\Route\HttpMethod;
use Lubian\AttributeMagic\Infrastructure\WebApp\Request\RequestEvent; use Lubian\AttributeMagic\Infrastructure\WebApp\Request\RequestEvent;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use function count;
use function FastRoute\cachedDispatcher; use function FastRoute\cachedDispatcher;
use function is_array;
use function is_string;
final readonly class HandlerResolver final readonly class HandlerResolver
{ {
@ -57,11 +60,11 @@ final readonly class HandlerResolver
} }
if ( if (
!is_array($routeInfo[1]) ! is_array($routeInfo[1])
|| count($routeInfo[1]) !== 2 || count($routeInfo[1]) !== 2
|| !is_string($routeInfo[1][0]) || ! is_string($routeInfo[1][0])
|| $routeInfo[1][0] === '' || $routeInfo[1][0] === ''
|| !is_string($routeInfo[1][1]) || ! is_string($routeInfo[1][1])
|| $routeInfo[1][1] === '' || $routeInfo[1][1] === ''
) { ) {
$this->notFound($event); $this->notFound($event);