@@ -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 PHPUnit\Framework\TestCase; |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | // setup |
| 31 | 31 | $router = $this->getRouter(); |
| 32 | - $router->addRoute('/user/[s:login]', function () { |
|
| 32 | + $router->addRoute('/user/[s:login]', function() { |
|
| 33 | 33 | return '1'; |
| 34 | 34 | }); |
| 35 | - $router->addRoute('/user/[s:login]/[s:regdate]', function () { |
|
| 35 | + $router->addRoute('/user/[s:login]/[s:regdate]', function() { |
|
| 36 | 36 | return '2'; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | // setup |
| 53 | 53 | $router = $this->getRouter(); |
| 54 | - $router->addRoute('/forum-[i:year]-[i:month]-[i:day]', function () { |
|
| 54 | + $router->addRoute('/forum-[i:year]-[i:month]-[i:day]', function() { |
|
| 55 | 55 | return '1'; |
| 56 | 56 | }); |
| 57 | 57 | |
@@ -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; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $router->addType('date', DateRouterType::class); |
| 178 | 178 | |
| 179 | 179 | foreach ($pattern as $r) { |
| 180 | - $router->addRoute($r, function () { |
|
| 180 | + $router->addRoute($r, function() { |
|
| 181 | 181 | // do nothing |
| 182 | 182 | }, $method); |
| 183 | 183 | } |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | { |
| 196 | 196 | // setup |
| 197 | 197 | $router = $this->getRouter(); |
| 198 | - for ($i = 0; $i < 15; $i ++) { |
|
| 199 | - $router->addRoute('/multiple/' . $i . '/[i:id]', function () { |
|
| 198 | + for ($i = 0; $i < 15; $i++) { |
|
| 199 | + $router->addRoute('/multiple/' . $i . '/[i:id]', function() { |
|
| 200 | 200 | return 'done!'; |
| 201 | 201 | }); |
| 202 | 202 | } |
@@ -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 PHPUnit\Framework\TestCase; |
@@ -29,22 +29,22 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | // setup |
| 31 | 31 | $router = $this->getRouter(); |
| 32 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]', function () { |
|
| 32 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]', function() { |
|
| 33 | 33 | return 'get-custom-field'; |
| 34 | 34 | }); |
| 35 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]/add', function () { |
|
| 35 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]/add', function() { |
|
| 36 | 36 | return 'add-custom-field'; |
| 37 | 37 | }); |
| 38 | - $router->addRoute('/user/[s:login]/custom-field/[s:name]/delete', function () { |
|
| 38 | + $router->addRoute('/user/[s:login]/custom-field/[s:name]/delete', function() { |
|
| 39 | 39 | return 'delete-custom-field'; |
| 40 | 40 | }); |
| 41 | - $router->addRoute('/restore-password/[s:token]', function () { |
|
| 41 | + $router->addRoute('/restore-password/[s:token]', function() { |
|
| 42 | 42 | return 'restore-password'; |
| 43 | 43 | }); |
| 44 | - $router->addRoute('/reset-password/[s:token]', function () { |
|
| 44 | + $router->addRoute('/reset-password/[s:token]', function() { |
|
| 45 | 45 | return 'reset-password'; |
| 46 | 46 | }); |
| 47 | - $router->addRoute('/user/[s:login]/delete', function () { |
|
| 47 | + $router->addRoute('/user/[s:login]/delete', function() { |
|
| 48 | 48 | return 'user-delete'; |
| 49 | 49 | }); |
| 50 | 50 | |