Passed
Branch master (273046)
by Ch
03:49 queued 01:31
created
examples/basic/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
          if (is_array($value)) {
32 32
              echo '<ul>';
33 33
              foreach ($value as $k => $v) {
34
-                 echo '<li>'.$k.': '.$v.'</li>';
34
+                 echo '<li>' . $k . ': ' . $v . '</li>';
35 35
              }
36 36
              echo '</ul>';
37 37
          } else {
Please login to merge, or discard this patch.
src/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
             return array(
92 92
                 'target' => $handler[2],
93
-                'params' => array_filter($this->parser->getParams(), function ($k) {
93
+                'params' => array_filter($this->parser->getParams(), function($k) {
94 94
                     return !is_numeric($k);
95 95
                 }, ARRAY_FILTER_USE_KEY),
96 96
                 'name'   => $handler[3]
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function __call($method, $arguments)
109 109
     {
110 110
         if (!in_array($method, array('get', 'post', 'delete', 'put', 'patch', 'update', 'all'))) {
111
-            throw new RouterException($method . ' not exist in the '. __CLASS__);
111
+            throw new RouterException($method . ' not exist in the ' . __CLASS__);
112 112
         }
113 113
 
114 114
         $methods = $method == 'all' ? implode('|', $this->all) : $method;
Please login to merge, or discard this patch.
src/Tests/RouterTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $method = 'POST';
86 86
         $route = '/[:controller]/[:action]';
87
-        $target = function () {
87
+        $target = function() {
88 88
         };
89 89
 
90 90
         $this->assertInternalType('array', $this->router->getRoutes());
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $method = 'POST';
101 101
         $route = '/[:controller]/[:action]';
102
-        $target = function () {
102
+        $target = function() {
103 103
         };
104 104
         
105 105
         $this->router->setRoutes(array(
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     {
162 162
         $method = 'POST';
163 163
         $route = '/[:controller]/[:action]';
164
-        $target = function () {
164
+        $target = function() {
165 165
         };
166 166
         
167 167
         $this->router->map($method, $route, $target);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $method = 'POST';
180 180
         $route = '/[:controller]/[:action]';
181
-        $target = function () {
181
+        $target = function() {
182 182
         };
183 183
         $name = 'myroute';
184 184
         
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             'action' => 'someaction'
210 210
         );
211 211
         
212
-        $this->router->map('GET', '/[:controller]/[:action]', function () {
212
+        $this->router->map('GET', '/[:controller]/[:action]', function() {
213 213
         }, 'foo_route');
214 214
         
215 215
         $this->assertEquals(
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
     public function testGenerateWithOptionalUrlParts()
237 237
     {
238
-        $this->router->map('GET', '/[:controller]/[:action].[:type]?', function () {
238
+        $this->router->map('GET', '/[:controller]/[:action].[:type]?', function() {
239 239
         }, 'bar_route');
240 240
         
241 241
         $params = array(
Please login to merge, or discard this patch.
src/RouterParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
     {
173 173
         $cPointer = $nPointer;
174 174
         $regex = in_array($cPointer, array('[', '(', '.'));
175
-        if (!$regex && isset($routeString[$iPointer+1])) {
175
+        if (!$regex && isset($routeString[$iPointer + 1])) {
176 176
             $nPointer = $routeString[$iPointer + 1];
177 177
             $regex = in_array($nPointer, array('?', '+', '*', '{'));
178 178
         }
Please login to merge, or discard this patch.