Completed
Push — 4.0 ( b89114...5a5e94 )
by Marco
02:16
created
src/Comodojo/Dispatcher/Router/Table.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -237,19 +237,33 @@  discard block
 block discarded – undo
237 237
             ->setClassName($class)
238 238
             ->setParameters($parameters);
239 239
 
240
-        if ( !empty($parameters['redirect-code']) ) $route->setRedirectCode($parameters['redirect-code']);
241
-        if ( !empty($parameters['redirect-location']) ) $route->setRedirectLocation($parameters['redirect-location']);
242
-        if ( !empty($parameters['redirect-message']) ) $route->setRedirectLocation($parameters['redirect-message']);
243
-        if ( !empty($parameters['redirect-type']) ) $route->setRedirectType($parameters['redirect-type']);
240
+        if ( !empty($parameters['redirect-code']) ) {
241
+            $route->setRedirectCode($parameters['redirect-code']);
242
+        }
243
+        if ( !empty($parameters['redirect-location']) ) {
244
+            $route->setRedirectLocation($parameters['redirect-location']);
245
+        }
246
+        if ( !empty($parameters['redirect-message']) ) {
247
+            $route->setRedirectLocation($parameters['redirect-message']);
248
+        }
249
+        if ( !empty($parameters['redirect-type']) ) {
250
+            $route->setRedirectType($parameters['redirect-type']);
251
+        }
244 252
 
245
-        if ( !empty($parameters['error-code']) ) $route->setErrorCode($parameters['error-code']);
246
-        if ( !empty($parameters['error-message']) ) $route->setErrorMessage($parameters['error-message']);
253
+        if ( !empty($parameters['error-code']) ) {
254
+            $route->setErrorCode($parameters['error-code']);
255
+        }
256
+        if ( !empty($parameters['error-message']) ) {
257
+            $route->setErrorMessage($parameters['error-message']);
258
+        }
247 259
 
248 260
     }
249 261
 
250 262
     private function readCache() {
251 263
 
252
-        if ($this->configuration->get('routing-table-cache') !== true) return;
264
+        if ($this->configuration->get('routing-table-cache') !== true) {
265
+            return;
266
+        }
253 267
 
254 268
         $data = $this->cache->read();
255 269
 
@@ -269,7 +283,9 @@  discard block
 block discarded – undo
269 283
 
270 284
     private function dumpCache() {
271 285
 
272
-        if ($this->configuration->get('routing-table-cache') !== true) return;
286
+        if ($this->configuration->get('routing-table-cache') !== true) {
287
+            return;
288
+        }
273 289
 
274 290
         $ttl = $this->configuration->get('routing-table-ttl');
275 291
 
Please login to merge, or discard this patch.