Passed
Push — master ( e190ec...05909f )
by Alex
07:37
created
Mezon/Router/Tests/Base/StaticRoutesTestClass.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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\Tests\Utils;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function testArrayRoutes(): void
83 83
     {
84 84
         $router = $this->getRouter();
85
-        $router->addRoute('/part1/part2/', function (string $route): string {
85
+        $router->addRoute('/part1/part2/', function(string $route): string {
86 86
             return $route;
87 87
         }, 'GET');
88 88
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $this->setRequestUri('/catalog/item/');
104 104
 
105 105
         $router = $this->getRouter();
106
-        $router->addRoute('/catalog/item/', function (string $route): string {
106
+        $router->addRoute('/catalog/item/', function(string $route): string {
107 107
             return $route;
108 108
         }, 'GET');
109 109
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $this->setRequestUri('/');
124 124
 
125 125
         $router = $this->getRouter();
126
-        $router->addRoute('/index/', function (string $route): string {
126
+        $router->addRoute('/index/', function(string $route): string {
127 127
             return $route;
128 128
         }, 'GET');
129 129
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $this->setRequestUri('/');
145 145
 
146 146
         $router = $this->getRouter();
147
-        $router->addRoute('/index/', function (string $route): string {
147
+        $router->addRoute('/index/', function(string $route): string {
148 148
             return $route;
149 149
         }, [
150 150
             'GET',
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     {
269 269
         // setup
270 270
         $router = $this->getRouter();
271
-        $router->addRoute('/route-to-clear/', function () use ($method) {
271
+        $router->addRoute('/route-to-clear/', function() use ($method) {
272 272
             return $method;
273 273
         }, $method);
274 274
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         $_SERVER['REQUEST_METHOD'] = $method;
292 292
 
293 293
         $router = $this->getRouter();
294
-        $router->addRoute('/catalog/', function (string $route): string {
294
+        $router->addRoute('/catalog/', function(string $route): string {
295 295
             return $route;
296 296
         }, $method);
297 297
 
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
     {
309 309
         // setup
310 310
         $router = $this->getRouter();
311
-        $router->addRoute('/searching-static-route/', function (string $route) {
311
+        $router->addRoute('/searching-static-route/', function(string $route) {
312 312
             return $route;
313 313
         });
314
-        $router->addRoute('/searching-param-route/[i:id]/', function (string $route) {
314
+        $router->addRoute('/searching-param-route/[i:id]/', function(string $route) {
315 315
             return $route;
316 316
         });
317 317
 
@@ -328,12 +328,12 @@  discard block
 block discarded – undo
328 328
     {
329 329
         // assertions
330 330
         $this->expectException(\Exception::class);
331
-        $this->expectExceptionCode(- 1);
331
+        $this->expectExceptionCode(-1);
332 332
         $this->expectExceptionMessage('Unsupported request method : INVALID');
333 333
 
334 334
         // setup
335 335
         $router = $this->getRouter();
336
-        $router->addRoute('/searching-static-route/', function (string $route) {
336
+        $router->addRoute('/searching-static-route/', function(string $route) {
337 337
             return $route;
338 338
         });
339 339
         $_SERVER['REQUEST_METHOD'] = 'INVALID';
Please login to merge, or discard this patch.