Passed
Push — master ( a4ddd3...82bd79 )
by Alex
06:44
created
Mezon/Router/SimpleUrlParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Mezon\Router;
4 4
 
5 5
 use Mezon\Router\Types\BaseType;
Please login to merge, or discard this patch.
Mezon/Router/Router.php 1 patch
Spacing   +2 added lines, -2 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;
4 4
 
5 5
 /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function callRoute($route)
70 70
     {
71
-        if (! $this->regExpsWereCompiled) {
71
+        if (!$this->regExpsWereCompiled) {
72 72
             $this->compileRegexpForBunches();
73 73
         }
74 74
 
Please login to merge, or discard this patch.
Mezon/Router/RoutesSet.php 1 patch
Spacing   +8 added lines, -8 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;
4 4
 
5 5
 /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $return = '';
35 35
 
36
-        for ($n = 0; $n <= $i; $n ++) {
36
+        for ($n = 0; $n <= $i; $n++) {
37 37
             $return .= '()';
38 38
         }
39 39
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     private function compileRegexpForBunch(array &$bunch): void
49 49
     {
50
-        if (! empty($bunch['bunch'])) {
50
+        if (!empty($bunch['bunch'])) {
51 51
             $bunch['regexp'] = '';
52 52
             /** @var array<int, array{pattern: string}> $hashTable */
53 53
             $hashTable = [];
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     private function compileRegexpForBunches(): void
88 88
     {
89
-        if (! $this->regExpsWereCompiled) {
89
+        if (!$this->regExpsWereCompiled) {
90 90
             foreach (SuppportedRequestMethods::getListOfSupportedRequestMethods() as $requestMethod) {
91 91
                 foreach ($this->paramRoutes[$requestMethod] as &$bunch) {
92 92
                     $this->compileRegexpForBunch($bunch);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $this->paramRoutes[$requestMethod][] = [
127 127
                 'bunch' => []
128 128
             ];
129
-            $bunchCursor ++;
129
+            $bunchCursor++;
130 130
             $lastBunchSize = 0;
131 131
         }
132 132
 
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
             ];
221 221
             // TODO try to remove $hasRoutes flag
222 222
             $hasRoutes = false;
223
-            if (! empty($this->staticRoutes[$requestMethod])) {
223
+            if (!empty($this->staticRoutes[$requestMethod])) {
224 224
                 $trace[] = implode(', ', array_keys($this->staticRoutes[$requestMethod]));
225 225
                 $trace[] = ', ';
226 226
                 $hasRoutes = true;
227 227
             }
228
-            if (! empty($this->paramRoutes[$requestMethod])) {
228
+            if (!empty($this->paramRoutes[$requestMethod])) {
229 229
                 foreach ($this->paramRoutes[$requestMethod] as $bunch) {
230 230
                     $items = [];
231 231
                     foreach ($bunch['bunch'] as $item) {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 }
237 237
             }
238 238
 
239
-            if (! $hasRoutes) {
239
+            if (!$hasRoutes) {
240 240
                 $trace[] = '<none>';
241 241
             }
242 242
 
Please login to merge, or discard this patch.
Mezon/Router/Tests/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Mezon\Router\Tests;
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Mezon/Router/Tests/Standart/UniversalRouteUnitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Mezon/Router/Tests/Standart/BigSetOfRoutesUnitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Mezon/Router/Tests/Standart/DynamicRoutesUnitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Mezon/Router/Tests/Standart/MiddlewareUnitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Mezon/Router/Tests/Standart/ExtractParametersUnitTest.php 1 patch
Spacing   +3 added lines, -3 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\Standart;
4 4
 
5 5
 use Mezon\Router\Router;
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
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
 
Please login to merge, or discard this patch.