@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use DrMVC\Router\Route; |
| 5 | 5 | use DrMVC\Router\Controllers\Index; |
| 6 | 6 | |
| 7 | -$route = new Route('get', '/<action>', function () { |
|
| 7 | +$route = new Route('get', '/<action>', function() { |
|
| 8 | 8 | echo 'asd'; |
| 9 | 9 | }); |
| 10 | 10 | print_r($route); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | ->get('/aaa/<action>/<action2>', DrMVC\Router\Controllers\Index::class) |
| 16 | 16 | ->get('/bbb/zzz/ccc', DrMVC\Router\Controllers\Index::class) |
| 17 | 17 | ->get('/action/zzz', |
| 18 | - function () { |
|
| 18 | + function() { |
|
| 19 | 19 | echo "action\n"; |
| 20 | 20 | } |
| 21 | 21 | ); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | // Find route by regexp and URI |
| 77 | 77 | $matches = array_map( |
| 78 | - function ($regexp, $route) { |
|
| 78 | + function($regexp, $route) { |
|
| 79 | 79 | $uri = $this->_url->getUri(); |
| 80 | 80 | $match = preg_match_all($regexp, $uri, $matches); |
| 81 | 81 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | public function map(array $methods, string $pattern, callable $callable): Interfaces\Router |
| 177 | 177 | { |
| 178 | 178 | array_map( |
| 179 | - function ($method) use ($pattern, $callable) { |
|
| 179 | + function($method) use ($pattern, $callable) { |
|
| 180 | 180 | $method = strtolower($method); |
| 181 | 181 | |
| 182 | 182 | try { |