Completed
Push — master ( 369737...64c6ea )
by Alex
07:19
created
Types/FixPointNumberRouterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function searchRegExp(): string
18 18
     {
19
-        return '(\[fp:'.BaseType::PARAMETER_NAME_REGEXP.'+\])';
19
+        return '(\[fp:' . BaseType::PARAMETER_NAME_REGEXP . '+\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Types/StringRouterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function searchRegExp(): string
18 18
     {
19
-        return '(\[s:'.BaseType::PARAMETER_NAME_REGEXP.'\])';
19
+        return '(\[s:' . BaseType::PARAMETER_NAME_REGEXP . '\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Types/IntegerListRouterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function searchRegExp(): string
18 18
     {
19
-        return '(\[il:'.BaseType::PARAMETER_NAME_REGEXP.'\])';
19
+        return '(\[il:' . BaseType::PARAMETER_NAME_REGEXP . '\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Types/CommandRouterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function searchRegExp(): string
18 18
     {
19
-        return '(\[a:'.BaseType::PARAMETER_NAME_REGEXP.'\])';
19
+        return '(\[a:' . BaseType::PARAMETER_NAME_REGEXP . '\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Types/IntegerRouterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function searchRegExp(): string
18 18
     {
19
-        return '(\[i:'.BaseType::PARAMETER_NAME_REGEXP.'+\])';
19
+        return '(\[i:' . BaseType::PARAMETER_NAME_REGEXP . '+\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Tests/StaticRoutesUnitTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function testArrayRoutes(): void
220 220
     {
221 221
         $router = new \Mezon\Router\Router();
222
-        $router->addRoute('/part1/part2/', function ($route) {
222
+        $router->addRoute('/part1/part2/', function($route) {
223 223
             return $route;
224 224
         }, 'GET');
225 225
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $this->setRequestUri('/catalog/item/');
240 240
 
241 241
         $router = new \Mezon\Router\Router();
242
-        $router->addRoute('/catalog/item/', function ($route) {
242
+        $router->addRoute('/catalog/item/', function($route) {
243 243
             return $route;
244 244
         }, 'GET');
245 245
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $this->setRequestUri('/');
259 259
 
260 260
         $router = new \Mezon\Router\Router();
261
-        $router->addRoute('/index/', function ($route) {
261
+        $router->addRoute('/index/', function($route) {
262 262
             return $route;
263 263
         }, 'GET');
264 264
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $this->setRequestUri('/');
279 279
 
280 280
         $router = new \Mezon\Router\Router();
281
-        $router->addRoute('/index/', function ($route) {
281
+        $router->addRoute('/index/', function($route) {
282 282
             return $route;
283 283
         }, [
284 284
             'GET',
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         $_SERVER['REQUEST_METHOD'] = RouterUnitTest::DELETE_REQUEST_METHOD;
331 331
 
332 332
         $router = new \Mezon\Router\Router();
333
-        $router->addRoute('/static-delete-existing/', function ($route) {
333
+        $router->addRoute('/static-delete-existing/', function($route) {
334 334
             return $route;
335 335
         }, RouterUnitTest::DELETE_REQUEST_METHOD);
336 336
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         $_SERVER['REQUEST_METHOD'] = 'PUT';
373 373
 
374 374
         $router = new \Mezon\Router\Router();
375
-        $router->addRoute('/static-put-existing/', function ($route) {
375
+        $router->addRoute('/static-put-existing/', function($route) {
376 376
             return $route;
377 377
         }, 'PUT');
378 378
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $_SERVER['REQUEST_METHOD'] = 'POST';
415 415
 
416 416
         $router = new \Mezon\Router\Router();
417
-        $router->addRoute('/catalog/', function ($route) {
417
+        $router->addRoute('/catalog/', function($route) {
418 418
             return $route;
419 419
         }, 'POST');
420 420
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     {
431 431
         // setup
432 432
         $router = new \Mezon\Router\Router();
433
-        $router->addRoute('/searching-route/', function (string $route) {
433
+        $router->addRoute('/searching-route/', function(string $route) {
434 434
             return $route;
435 435
         });
436 436
 
Please login to merge, or discard this patch.
Tests/DynamicRoutesInvalidCasesUnitTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         // setup
34 34
         $router = new \Mezon\Router\Router();
35
-        $router->addRoute('/catalog/[i:foo]/', function () {
35
+        $router->addRoute('/catalog/[i:foo]/', function() {
36 36
             // do nothing
37 37
         });
38 38
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         // setup
53 53
         $_SERVER['REQUEST_METHOD'] = 'HEAD';
54 54
         $router = new \Mezon\Router\Router();
55
-        $router->addRoute('/catalog/[i:foo]/', function () {
55
+        $router->addRoute('/catalog/[i:foo]/', function() {
56 56
             // do nothing
57 57
         });
58 58
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         // setup
188 188
         $router = new \Mezon\Router\Router();
189
-        $router->addRoute($route, function () {
189
+        $router->addRoute($route, function() {
190 190
             // do nothing
191 191
         });
192 192
 
Please login to merge, or discard this patch.
Tests/DynamicRoutesUnitTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         // setup
24 24
         $router = new \Mezon\Router\Router();
25
-        $router->addRoute('/catalog/[i:foo]/', function () {
25
+        $router->addRoute('/catalog/[i:foo]/', function() {
26 26
             // do nothing
27 27
         });
28 28
 
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
         // setup
113 113
         $router = new \Mezon\Router\Router();
114 114
         if (is_string($pattern)) {
115
-            $router->addRoute($pattern, function () {
115
+            $router->addRoute($pattern, function() {
116 116
                 // do nothing
117 117
             });
118 118
         } else {
119 119
             foreach ($pattern as $r) {
120
-                $router->addRoute($r, function () {
120
+                $router->addRoute($r, function() {
121 121
                     // do nothing
122 122
                 });
123 123
             }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function testStringParamSecurity(): void
159 159
     {
160 160
         $router = new \Mezon\Router\Router();
161
-        $router->addRoute('/catalog/[s:foo]/', function ($route, $parameters) {
161
+        $router->addRoute('/catalog/[s:foo]/', function($route, $parameters) {
162 162
             return $parameters['foo'];
163 163
         });
164 164
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $_SERVER['REQUEST_METHOD'] = 'DELETE';
176 176
 
177 177
         $router = new \Mezon\Router\Router();
178
-        $router->addRoute('/catalog/[i:cat_id]', function ($route) {
178
+        $router->addRoute('/catalog/[i:cat_id]', function($route) {
179 179
             return $route;
180 180
         }, 'DELETE');
181 181
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $_SERVER['REQUEST_METHOD'] = 'PUT';
193 193
 
194 194
         $router = new \Mezon\Router\Router();
195
-        $router->addRoute('/catalog/[i:cat_id]', function ($route) {
195
+        $router->addRoute('/catalog/[i:cat_id]', function($route) {
196 196
             return $route;
197 197
         }, 'PUT');
198 198
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $_SERVER['REQUEST_METHOD'] = 'POST';
210 210
 
211 211
         $router = new \Mezon\Router\Router();
212
-        $router->addRoute('/catalog/[i:cat_id]', function ($route) {
212
+        $router->addRoute('/catalog/[i:cat_id]', function($route) {
213 213
             return $route;
214 214
         }, 'POST');
215 215
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     public function testValidExtractedParameter(): void
378 378
     {
379 379
         $router = new \Mezon\Router\Router();
380
-        $router->addRoute('/catalog/[a:cat_id]/', function ($route, $parameters) {
380
+        $router->addRoute('/catalog/[a:cat_id]/', function($route, $parameters) {
381 381
             return $parameters['cat_id'];
382 382
         });
383 383
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         $router = new \Mezon\Router\Router();
395 395
         $router->addRoute(
396 396
             '/catalog/[a:cat_id]/[i:item_id]',
397
-            function ($route, $parameters) {
397
+            function($route, $parameters) {
398 398
                 return $parameters['cat_id'] . $parameters['item_id'];
399 399
             });
400 400
 
@@ -409,10 +409,10 @@  discard block
 block discarded – undo
409 409
     public function testValidRouteParameter(): void
410 410
     {
411 411
         $router = new \Mezon\Router\Router();
412
-        $router->addRoute('/catalog/all/', function ($route) {
412
+        $router->addRoute('/catalog/all/', function($route) {
413 413
             return $route;
414 414
         });
415
-        $router->addRoute('/catalog/[i:cat_id]', function ($route) {
415
+        $router->addRoute('/catalog/[i:cat_id]', function($route) {
416 416
             return $route;
417 417
         });
418 418
 
Please login to merge, or discard this patch.