@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $return = ''; |
52 | 52 | |
53 | - for ($n = 0; $n <= $i; $n ++) { |
|
53 | + for ($n = 0; $n <= $i; $n++) { |
|
54 | 54 | $return .= '()'; |
55 | 55 | } |
56 | 56 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function compileRegexpForBunch(array &$bunch): void |
66 | 66 | { |
67 | - if (! empty($bunch['bunch'])) { |
|
67 | + if (!empty($bunch['bunch'])) { |
|
68 | 68 | $bunch['regexp'] = ''; |
69 | 69 | $hashTable = []; |
70 | 70 | $items = []; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | protected function compileRegexpForBunches(): void |
102 | 102 | { |
103 | - if (! $this->regExpsWereCompiled) { |
|
103 | + if (!$this->regExpsWereCompiled) { |
|
104 | 104 | foreach (self::getListOfSupportedRequestMethods() as $requestMethod) { |
105 | 105 | foreach ($this->paramRoutes[$requestMethod] as &$bunch) { |
106 | 106 | $this->compileRegexpForBunch($bunch); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->paramRoutes[$requestMethod][] = [ |
137 | 137 | 'bunch' => [] |
138 | 138 | ]; |
139 | - $bunchCursor ++; |
|
139 | + $bunchCursor++; |
|
140 | 140 | $lastBunchSize = 0; |
141 | 141 | } |
142 | 142 | |
@@ -262,12 +262,12 @@ discard block |
||
262 | 262 | $requestMethod . ' : ' |
263 | 263 | ]; |
264 | 264 | $hasRoutes = false; |
265 | - if (! empty($this->staticRoutes[$requestMethod])) { |
|
265 | + if (!empty($this->staticRoutes[$requestMethod])) { |
|
266 | 266 | $trace[] = implode(', ', array_keys($this->staticRoutes[$requestMethod])); |
267 | 267 | $trace[] = ', '; |
268 | 268 | $hasRoutes = true; |
269 | 269 | } |
270 | - if (! empty($this->paramRoutes[$requestMethod])) { |
|
270 | + if (!empty($this->paramRoutes[$requestMethod])) { |
|
271 | 271 | foreach ($this->paramRoutes[$requestMethod] as $bunch) { |
272 | 272 | $items = []; |
273 | 273 | foreach ($bunch['bunch'] as $item) { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | } |
280 | 280 | |
281 | - if (! $hasRoutes) { |
|
281 | + if (!$hasRoutes) { |
|
282 | 282 | $trace[] = '<none>'; |
283 | 283 | } |
284 | 284 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // setup |
45 | 45 | RouterUnitTest::setRequestMethod('GET'); |
46 | 46 | $router = new Router(); |
47 | - $router->addRoute($route, function () { |
|
47 | + $router->addRoute($route, function() { |
|
48 | 48 | return 'route result'; |
49 | 49 | }); |
50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | // setup |
64 | 64 | $router = new Router(); |
65 | - $router->addRoute('existing-route', function () { |
|
65 | + $router->addRoute('existing-route', function() { |
|
66 | 66 | return 'existing route result'; |
67 | 67 | }); |
68 | 68 |
@@ -36,8 +36,8 @@ |
||
36 | 36 | // setup |
37 | 37 | RouterUnitTest::setRequestMethod('GET'); |
38 | 38 | $router = new Router(); |
39 | - for ($i = 1; $i <= $amount; $i ++) { |
|
40 | - $router->addRoute('/param/[i:id]/' . $i, function () use ($i): int { |
|
39 | + for ($i = 1; $i <= $amount; $i++) { |
|
40 | + $router->addRoute('/param/[i:id]/' . $i, function() use ($i): int { |
|
41 | 41 | return $i; |
42 | 42 | }); |
43 | 43 | } |