We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc6fab2 commit 65276e8Copy full SHA for 65276e8
.gitignore
@@ -1 +1,3 @@
1
/vendor/
2
+.idea
3
+
src/AppRouter.php
@@ -539,7 +539,11 @@ public static function dispatch()
539
// Fetch method and URI from somewhere
540
self::$routeInfo = $routeInfo = (self::$dispatcher)->dispatch(self::$httpMethod, self::$uri);
541
542
- list($state, $handler, $method_parameters) = $routeInfo;
+ // list($state, $handler, $method_parameters) = $routeInfo;
543
+ // PHP8+ good practice:
544
+ $state = $routeInfo[0];
545
+ $handler = $routeInfo[1] ?? [];
546
+ $method_parameters = $routeInfo[2] ?? [];
547
548
// dispatch errors
549
if ($state === Dispatcher::NOT_FOUND) {
0 commit comments