@@ -31,7 +31,7 @@ |
||
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 { |
@@ -90,7 +90,7 @@ discard block |
||
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 |
||
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; |
@@ -172,7 +172,7 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $this->router = new Router($parser, [], '', []); |
30 | 30 | $this->param1 = ['controller' => 'test', 'action' => 'someaction']; |
31 | 31 | $this->param2 = ['controller' => 'test', 'action' => 'someaction', 'type' => 'json']; |
32 | - $this->closure = function () { |
|
32 | + $this->closure = function() { |
|
33 | 33 | }; |
34 | 34 | } |
35 | 35 |