Skip to content

Commit 2c331f5

Browse files
committed
refactor: run rector and php-cs-fixer
1 parent a98bde1 commit 2c331f5

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

system/Router/AutoRouter.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,16 @@ public function getRoute(string $uri): array
127127
$methodName = strtolower($this->methodName());
128128

129129
foreach ($this->protectedControllers as $controllerInRoute) {
130-
if (is_string($controllerInRoute)) {
131-
if (strtolower($controllerInRoute) === $controller) {
132-
throw new PageNotFoundException(
133-
'Cannot access the controller in a CLI Route. Controller: ' . $controllerInRoute
134-
);
135-
}
130+
if (! is_string($controllerInRoute)) {
131+
continue;
136132
}
133+
if (strtolower($controllerInRoute) !== $controller) {
134+
continue;
135+
}
136+
137+
throw new PageNotFoundException(
138+
'Cannot access the controller in a CLI Route. Controller: ' . $controllerInRoute
139+
);
137140
}
138141
}
139142

0 commit comments

Comments
 (0)