@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use Mezon\Router\RouterInterface; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use Mezon\Router\Tests\Base\DynamicRoutesTestClass; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use Mezon\Router\Router; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use Mezon\Router\Router; |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | public function testValidRouteParameter(): void |
31 | 31 | { |
32 | 32 | $router = new Router(); |
33 | - $router->addRoute('/catalog/all/', function (string $route): string { |
|
33 | + $router->addRoute('/catalog/all/', function(string $route): string { |
|
34 | 34 | return $route; |
35 | 35 | }); |
36 | - $router->addRoute('/catalog/[i:cat_id]', function (string $route): string { |
|
36 | + $router->addRoute('/catalog/[i:cat_id]', function(string $route): string { |
|
37 | 37 | return $route; |
38 | 38 | }); |
39 | 39 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use PHPUnit\Framework\TestCase; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use Mezon\Router\Tests\Base\StaticRoutesTestClass; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Standart; |
4 | 4 | |
5 | 5 | use PHPUnit\Framework\TestCase; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | // setup |
51 | 51 | RouterUnitTestUtils::setRequestMethod('GET'); |
52 | 52 | $router = new Router(); |
53 | - $router->addRoute($route, function () { |
|
53 | + $router->addRoute($route, function() { |
|
54 | 54 | return 'route result'; |
55 | 55 | }); |
56 | 56 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | // setup |
74 | 74 | $router = new Router(); |
75 | - $router->addRoute('existing-route', function () { |
|
75 | + $router->addRoute('existing-route', function() { |
|
76 | 76 | return 'existing route result'; |
77 | 77 | }); |
78 | 78 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests; |
4 | 4 | |
5 | 5 | use Mezon\Router\Router; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router\Tests\Base; |
4 | 4 | |
5 | 5 | use Mezon\Router\Types\DateRouterType; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $router->addType('date', DateRouterType::class); |
194 | 194 | |
195 | 195 | foreach ($pattern as $r) { |
196 | - $router->addRoute($r, function () { |
|
196 | + $router->addRoute($r, function() { |
|
197 | 197 | // do nothing |
198 | 198 | }, $method); |
199 | 199 | } |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | { |
212 | 212 | // setup |
213 | 213 | $router = $this->getRouter(); |
214 | - for ($i = 0; $i < 15; $i ++) { |
|
215 | - $router->addRoute('/multiple/' . $i . '/[i:id]', function () { |
|
214 | + for ($i = 0; $i < 15; $i++) { |
|
215 | + $router->addRoute('/multiple/' . $i . '/[i:id]', function() { |
|
216 | 216 | return 'done!'; |
217 | 217 | }); |
218 | 218 | } |
@@ -233,22 +233,22 @@ discard block |
||
233 | 233 | { |
234 | 234 | // setup |
235 | 235 | $router = $this->getRouter(); |
236 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]', function () { |
|
236 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]', function() { |
|
237 | 237 | return 'get-custom-field'; |
238 | 238 | }); |
239 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]/add', function () { |
|
239 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]/add', function() { |
|
240 | 240 | return 'add-custom-field'; |
241 | 241 | }); |
242 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]/delete', function () { |
|
242 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]/delete', function() { |
|
243 | 243 | return 'delete-custom-field'; |
244 | 244 | }); |
245 | - $router->addRoute('/restore-password/[s:token]', function () { |
|
245 | + $router->addRoute('/restore-password/[s:token]', function() { |
|
246 | 246 | return 'restore-password'; |
247 | 247 | }); |
248 | - $router->addRoute('/reset-password/[s:token]', function () { |
|
248 | + $router->addRoute('/reset-password/[s:token]', function() { |
|
249 | 249 | return 'reset-password'; |
250 | 250 | }); |
251 | - $router->addRoute('/user/[s:login]/delete', function () { |
|
251 | + $router->addRoute('/user/[s:login]/delete', function() { |
|
252 | 252 | return 'user-delete'; |
253 | 253 | }); |
254 | 254 |