Completed
Push — master ( ea1b5f...ff080b )
by judicael
09:32
created
bundles/core/Router.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -195,8 +195,7 @@  discard block
 block discarded – undo
195 195
                                 if ($mReturn === 403) {
196 196
     
197 197
                                     $this->_getPage403();
198
-                                }
199
-                                else if ($mReturn === true) {
198
+                                } else if ($mReturn === true) {
200 199
     
201 200
                                     if (isset($oRoute->cache)) { $this->_checkCache($oRoute->cache); }
202 201
     
@@ -211,8 +210,7 @@  discard block
 block discarded – undo
211 210
             }
212 211
         } else if (Request::isCliRequest()) {
213 212
 
214
-            if (isset($_SERVER['argv'])) { $aArguments = $_SERVER['argv']; }
215
-            else { $aArguments = []; }
213
+            if (isset($_SERVER['argv'])) { $aArguments = $_SERVER['argv']; } else { $aArguments = []; }
216 214
 
217 215
             define('PORTAL', 'Batch');
218 216
             set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
@@ -224,8 +222,7 @@  discard block
 block discarded – undo
224 222
                 $aArguments[1] = "phpunit";
225 223
             } else if (isset($aArguments[1])) {
226 224
                 $sBatchName = $aArguments[1];
227
-            }
228
-            else {
225
+            } else {
229 226
                 $aArguments[1] = 'help';
230 227
                 $sBatchName = $aArguments[1];
231 228
             }
@@ -320,8 +317,7 @@  discard block
 block discarded – undo
320 317
                     }
321 318
                 }
322 319
             }
323
-        }
324
-        else if (defined('STDIN')) {
320
+        } else if (defined('STDIN')) {
325 321
 
326 322
             $oBatch = Config::get('Route')->batch->script->{$sRoute};
327 323
             echo $this->_loadController($oBatch->controller, $oBatch->action, $aParams);
@@ -383,8 +379,7 @@  discard block
 block discarded – undo
383 379
                 },
384 380
                 $sRoute
385 381
             );
386
-        }
387
-        else {
382
+        } else {
388 383
 
389 384
             $sFinalRoute = '.*';
390 385
         }
@@ -434,8 +429,7 @@  discard block
 block discarded – undo
434 429
 
435 430
                 $oMobileDetect = new \Mobile_Detect;
436 431
 
437
-                if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; }
438
-                else { $sCacheExt = ''; }
432
+                if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; }
439 433
 
440 434
                 $mCacheReturn = Cache::get($RequestUri.$sCacheExt, $oRoute->cache->max_age);
441 435
 
@@ -465,8 +459,7 @@  discard block
 block discarded – undo
465 459
 
466 460
                         header('Content-type: image/jpeg');
467 461
                     }
468
-                }
469
-                else {
462
+                } else {
470 463
 
471 464
                     header('Content-type: text/html; charset='.$sCharset.'');
472 465
                 }
@@ -509,8 +502,7 @@  discard block
 block discarded – undo
509 502
                         $mReturn = $this->_loadController($oController, $sActionName, $aEntries);
510 503
 
511 504
                     }
512
-                }
513
-                else {
505
+                } else {
514 506
 
515 507
                     $mReturn = $this->_loadController($oController, $sActionName, $aEntries);
516 508
                 }
@@ -522,8 +514,7 @@  discard block
 block discarded – undo
522 514
                         $mReturn = json_encode($mReturn, JSON_PRETTY_PRINT);
523 515
                     }
524 516
                 }
525
-            }
526
-            else if (isset($oRoute->template) && isset($oRoute->layout) && $oRoute->layout === true) {
517
+            } else if (isset($oRoute->template) && isset($oRoute->layout) && $oRoute->layout === true) {
527 518
 
528 519
                 define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
529 520
                 set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
@@ -540,8 +531,7 @@  discard block
 block discarded – undo
540 531
 
541 532
                 $mReturn = $oLayout->assign('model', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.$oRoute->template.'.tpl')
542 533
                                    ->fetch();
543
-            }
544
-            else if (isset($oRoute->template)) {
534
+            } else if (isset($oRoute->template)) {
545 535
 
546 536
                 define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
547 537
                 set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
@@ -565,8 +555,7 @@  discard block
 block discarded – undo
565 555
 
566 556
                 $oMobileDetect = new \Mobile_Detect;
567 557
 
568
-                if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; }
569
-                else { $sCacheExt = ''; }
558
+                if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; }
570 559
 
571 560
                 if (defined('COMPRESS_HTML') && COMPRESS_HTML) {
572 561
 
@@ -620,8 +609,7 @@  discard block
 block discarded – undo
620 609
 
621 610
             $oMobileDetect = new \Mobile_Detect;
622 611
 
623
-            if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; }
624
-            else { $sCacheExt = ''; }
612
+            if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; }
625 613
 
626 614
             $mCacheReturn = Cache::get($sActionName.$sCacheExt, $aPhpDoc['Cache']['maxage']);
627 615
 
@@ -662,8 +650,7 @@  discard block
 block discarded – undo
662 650
 
663 651
             $oMobileDetect = new \Mobile_Detect;
664 652
 
665
-            if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; }
666
-            else { $sCacheExt = ''; }
653
+            if ($oMobileDetect->isMobile()) { $sCacheExt = '.mobi'; } else { $sCacheExt = ''; }
667 654
 
668 655
             if (defined('COMPRESS_HTML') && COMPRESS_HTML) {
669 656
 
Please login to merge, or discard this patch.