Passed
Push — master ( a4ddd3...82bd79 )
by Alex
06:44
created
Mezon/Router/UrlParserBase.php 1 patch
Spacing   +4 added lines, -4 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
 /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $routerTrimmed = trim($router, '/');
32 32
 
33
-        if (! isset($this->middleware[$routerTrimmed])) {
33
+        if (!isset($this->middleware[$routerTrimmed])) {
34 34
             $this->middleware[$routerTrimmed] = [];
35 35
         }
36 36
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getParam(string $name): string
55 55
     {
56
-        if (! isset($this->parameters[$name])) {
56
+        if (!isset($this->parameters[$name])) {
57 57
             throw (new \Exception('Parameter ' . $name . ' was not found in route', - 1));
58 58
         }
59 59
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $this->parameters
131 131
         ];
132 132
 
133
-        if (! count($middleWares)) {
133
+        if (!count($middleWares)) {
134 134
             return $result;
135 135
         }
136 136
 
Please login to merge, or discard this patch.
Mezon/Router/Utils.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
 /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $methodName[0] = strtolower($methodName[0]);
33 33
         }
34 34
 
35
-        for ($i = 1; $i < strlen($methodName); $i ++) {
35
+        for ($i = 1; $i < strlen($methodName); $i++) {
36 36
             if (ctype_upper($methodName[$i])) {
37 37
                 $methodName = substr_replace($methodName, '-' . strtolower($methodName[$i]), $i, 1);
38 38
             }
Please login to merge, or discard this patch.
Mezon/Router/ParamRoutes.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
 /**
Please login to merge, or discard this patch.
Mezon/Router/UrlParser.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/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.