@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | $methods = array_map("strtoupper", $methods); |
126 | 126 | |
127 | - array_map(function ($method) use ($uri, $callback) { |
|
127 | + array_map(function($method) use ($uri, $callback) { |
|
128 | 128 | $this->routes[$method][$uri] = $this->addRouter($uri, $callback); |
129 | 129 | }, $methods); |
130 | 130 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | protected function dispatchRoute(): ?\Closure |
323 | 323 | { |
324 | 324 | if (!$route = $this->currentRoute) { |
325 | - if($fallbackRoute = $this->getByName('fallback')) { |
|
325 | + if ($fallbackRoute = $this->getByName('fallback')) { |
|
326 | 326 | return $this->executeRoute($fallbackRoute); |
327 | 327 | } |
328 | 328 | |
@@ -337,11 +337,11 @@ discard block |
||
337 | 337 | ); |
338 | 338 | } |
339 | 339 | |
340 | - if(!$middlewareResponse = $this->executeMiddlewares($route)) { |
|
340 | + if (!$middlewareResponse = $this->executeMiddlewares($route)) { |
|
341 | 341 | return null; |
342 | 342 | } |
343 | 343 | |
344 | - if(is_callable($middlewareResponse)) { |
|
344 | + if (is_callable($middlewareResponse)) { |
|
345 | 345 | return call_user_func($middlewareResponse); |
346 | 346 | } |
347 | 347 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | |
420 | 420 | $callMiddleware = $route->getMiddleware()->execute(); |
421 | 421 | |
422 | - if($callMiddleware === true) { |
|
422 | + if ($callMiddleware === true) { |
|
423 | 423 | return true; |
424 | 424 | } |
425 | 425 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | ); |
434 | 434 | } |
435 | 435 | |
436 | - if(is_string($callMiddleware)) { |
|
436 | + if (is_string($callMiddleware)) { |
|
437 | 437 | die($callMiddleware); |
438 | 438 | } |
439 | 439 |