@@ -84,10 +84,11 @@ discard block |
||
84 | 84 | |
85 | 85 | $regex = $this->regex($route); |
86 | 86 | |
87 | - if (isset($this->routes[$regex])) |
|
88 | - return $this->routes[$regex]; |
|
89 | - else |
|
90 | - return null; |
|
87 | + if (isset($this->routes[$regex])) { |
|
88 | + return $this->routes[$regex]; |
|
89 | + } else { |
|
90 | + return null; |
|
91 | + } |
|
91 | 92 | |
92 | 93 | } |
93 | 94 | |
@@ -157,11 +158,15 @@ discard block |
||
157 | 158 | |
158 | 159 | private function readCache() { |
159 | 160 | |
160 | - if ( $this->configuration()->get('routing-table-cache') !== true ) return; |
|
161 | + if ( $this->configuration()->get('routing-table-cache') !== true ) { |
|
162 | + return; |
|
163 | + } |
|
161 | 164 | |
162 | 165 | $routes = $this->cache->setNamespace('dispatcher-internals')->get("dispatcher-routes"); |
163 | 166 | |
164 | - if (is_null($routes)) return; |
|
167 | + if (is_null($routes)) { |
|
168 | + return; |
|
169 | + } |
|
165 | 170 | |
166 | 171 | foreach ($routes as $name => $data) { |
167 | 172 | |
@@ -177,7 +182,9 @@ discard block |
||
177 | 182 | |
178 | 183 | private function dumpCache() { |
179 | 184 | |
180 | - if ( $this->configuration()->get('routing-table-cache') !== true ) return; |
|
185 | + if ( $this->configuration()->get('routing-table-cache') !== true ) { |
|
186 | + return; |
|
187 | + } |
|
181 | 188 | |
182 | 189 | $ttl = $this->configuration()->get('routing-table-ttl'); |
183 | 190 |
@@ -243,7 +243,9 @@ discard block |
||
243 | 243 | |
244 | 244 | $cache = $this->cache()->setNamespace('dispatcher-service')->get($name); |
245 | 245 | |
246 | - if ( is_null($cache) ) return false; |
|
246 | + if ( is_null($cache) ) { |
|
247 | + return false; |
|
248 | + } |
|
247 | 249 | |
248 | 250 | $this->response = $cache; |
249 | 251 | |
@@ -287,7 +289,9 @@ discard block |
||
287 | 289 | |
288 | 290 | if ( !empty($params) && is_array($params) ) { |
289 | 291 | |
290 | - foreach($params as $name=>$value) $this->response()->headers()->set($name, $value); |
|
292 | + foreach($params as $name=>$value) { |
|
293 | + $this->response()->headers()->set($name, $value); |
|
294 | + } |
|
291 | 295 | } |
292 | 296 | |
293 | 297 | } |
@@ -96,7 +96,9 @@ discard block |
||
96 | 96 | |
97 | 97 | $supported_methods = $this->configuration()->get('supported-http-methods'); |
98 | 98 | |
99 | - if ( is_null($supported_methods) ) $supported_methods = array('GET','PUT','POST','DELETE','OPTIONS','HEAD','TRACE','CONNECT'); |
|
99 | + if ( is_null($supported_methods) ) { |
|
100 | + $supported_methods = array('GET','PUT','POST','DELETE','OPTIONS','HEAD','TRACE','CONNECT'); |
|
101 | + } |
|
100 | 102 | |
101 | 103 | if ( method_exists($this, 'any') ) { |
102 | 104 | |
@@ -108,7 +110,9 @@ discard block |
||
108 | 110 | |
109 | 111 | foreach ( $supported_methods as $method ) { |
110 | 112 | |
111 | - if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods,$method); |
|
113 | + if ( method_exists($this, strtolower($method)) ) { |
|
114 | + array_push($implemented_methods,$method); |
|
115 | + } |
|
112 | 116 | |
113 | 117 | } |
114 | 118 |
@@ -65,7 +65,9 @@ discard block |
||
65 | 65 | |
66 | 66 | $handler = $this->getHandler($provider, $parameters); |
67 | 67 | |
68 | - if ( $handler instanceof HandlerInterface ) $logger->pushHandler($handler); |
|
68 | + if ( $handler instanceof HandlerInterface ) { |
|
69 | + $logger->pushHandler($handler); |
|
70 | + } |
|
69 | 71 | |
70 | 72 | } |
71 | 73 | |
@@ -112,7 +114,9 @@ discard block |
||
112 | 114 | |
113 | 115 | case 'SyslogHandler': |
114 | 116 | |
115 | - if ( empty($parameters['ident']) ) return null; |
|
117 | + if ( empty($parameters['ident']) ) { |
|
118 | + return null; |
|
119 | + } |
|
116 | 120 | |
117 | 121 | $facility = empty($parameters['facility']) ? LOG_USER : $parameters['facility']; |
118 | 122 | |
@@ -211,7 +215,9 @@ discard block |
||
211 | 215 | |
212 | 216 | protected static function getFilePermission($filepermission = null) { |
213 | 217 | |
214 | - if ( is_null($filepermission) ) return null; |
|
218 | + if ( is_null($filepermission) ) { |
|
219 | + return null; |
|
220 | + } |
|
215 | 221 | |
216 | 222 | return filter_var($bubble, FILTER_VALIDATE_INT, array( |
217 | 223 | 'options' => array( |