Passed
Push — master ( e52a48...dea1e5 )
by Alex
01:56
created
Mezon/Router/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.
Mezon/Router/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.
Mezon/Router/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.
Mezon/Router/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.
Mezon/Router/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.
Mezon/Router/Types/DateRouterType.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 '(\[date:'.BaseType::PARAMETER_NAME_REGEXP.'\])';
19
+        return '(\[date:' . BaseType::PARAMETER_NAME_REGEXP . '\])';
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
Mezon/Router/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 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/Tests/RouterUnitTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             # 1, lambda
80 80
             [
81 81
                 '/one-component-lambda/',
82
-                function () {
82
+                function() {
83 83
                     return 'Hello lambda!';
84 84
                 },
85 85
                 'Hello lambda!'
@@ -168,16 +168,16 @@  discard block
 block discarded – undo
168 168
     {
169 169
         $route = '/catalog/';
170 170
         $router = new \Mezon\Router\Router();
171
-        $router->addRoute($route, function () {
171
+        $router->addRoute($route, function() {
172 172
             return 'POST';
173 173
         }, 'POST');
174
-        $router->addRoute($route, function () {
174
+        $router->addRoute($route, function() {
175 175
             return 'GET';
176 176
         }, 'GET');
177
-        $router->addRoute($route, function () {
177
+        $router->addRoute($route, function() {
178 178
             return 'PUT';
179 179
         }, 'PUT');
180
-        $router->addRoute($route, function () {
180
+        $router->addRoute($route, function() {
181 181
             return RouterUnitTest::DELETE_REQUEST_METHOD;
182 182
         }, RouterUnitTest::DELETE_REQUEST_METHOD);
183 183
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     {
214 214
         // setup
215 215
         $router = new \Mezon\Router\Router();
216
-        $router->setNoProcessorFoundErrorHandler(function () {
216
+        $router->setNoProcessorFoundErrorHandler(function() {
217 217
             $this->errorHandler();
218 218
         });
219 219
 
Please login to merge, or discard this patch.
Mezon/Router/Tests/DynamicRoutesInvalidCasesUnitTest.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         // setup
43 43
         $_SERVER['REQUEST_METHOD'] = 'HEAD';
44 44
         $router = new \Mezon\Router\Router();
45
-        $router->addRoute('/catalog/[i:foo]/', function () {
45
+        $router->addRoute('/catalog/[i:foo]/', function() {
46 46
             // do nothing
47 47
         });
48 48
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $router = new \Mezon\Router\Router();
63 63
         $router->addRoute('/catalog/[il:cat_id]/', [
64 64
             $this,
65
-            function () {return 1;}
65
+            function() {return 1; }
66 66
         ]);
67 67
 
68 68
         // assertion
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $router = new \Mezon\Router\Router();
85 85
         $router->addRoute('/catalog/[i:cat_id]', [
86 86
             $this,
87
-            function () {return 1;}
87
+            function() {return 1; }
88 88
         ]);
89 89
 
90 90
         try {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $router = new \Mezon\Router\Router();
110 110
         $router->addRoute('/catalog/[i:cat_id]', [
111 111
             $this,
112
-            function () {return 1;}
112
+            function() {return 1; }
113 113
         ]);
114 114
 
115 115
         try {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $router = new \Mezon\Router\Router();
135 135
         $router->addRoute('/catalog/[i:item_id]', [
136 136
             $this,
137
-            function () {return 1;}
137
+            function() {return 1; }
138 138
         ]);
139 139
 
140 140
         try {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     {
177 177
         // setup
178 178
         $router = new \Mezon\Router\Router();
179
-        $router->addRoute($route, function () {
179
+        $router->addRoute($route, function() {
180 180
             // do nothing
181 181
         });
182 182
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $router = new \Mezon\Router\Router();
196 196
         $router->addRoute('/catalog/[unexisting-type:i]/item/', [
197 197
             $this,
198
-            function () {return 1;}
198
+            function() {return 1; }
199 199
         ]);
200 200
 
201 201
         try {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $router = new \Mezon\Router\Router();
215 215
         $router->addRoute('/catalog/[i:cat_id]/item/[unexisting-type-trace:item_id]/', [
216 216
             $this,
217
-            function () {return 1;}
217
+            function() {return 1; }
218 218
         ]);
219 219
 
220 220
         try {
Please login to merge, or discard this patch.