@@ -276,8 +276,9 @@ discard block |
||
| 276 | 276 | { |
| 277 | 277 | $di->set('url', function () use ($appConfig) { |
| 278 | 278 | $url = new \Phalcon\Mvc\Url(); |
| 279 | - if (!is_null($appConfig->base_url)) |
|
| 280 | - $url->setBaseUri($appConfig->base_url); |
|
| 279 | + if (!is_null($appConfig->base_url)) { |
|
| 280 | + $url->setBaseUri($appConfig->base_url); |
|
| 281 | + } |
|
| 281 | 282 | return $url; |
| 282 | 283 | }, true); |
| 283 | 284 | } |
@@ -488,8 +489,7 @@ discard block |
||
| 488 | 489 | |
| 489 | 490 | // handle incoming arguments |
| 490 | 491 | $application->handle($arguments); |
| 491 | -} |
|
| 492 | -else |
|
| 492 | +} else |
|
| 493 | 493 | { |
| 494 | 494 | |
| 495 | 495 | //Handle the request |
@@ -9,13 +9,15 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | # Global function for getting included file name |
| 11 | 11 | function _if($folderName, $fileName, $enviroment = null ) { |
| 12 | - if ( is_null($enviroment) ) |
|
| 13 | - $enviroment = "ENVIRONMENT"; |
|
| 12 | + if ( is_null($enviroment) ) { |
|
| 13 | + $enviroment = "ENVIRONMENT"; |
|
| 14 | + } |
|
| 14 | 15 | $file = "{$folderName}{$enviroment}/{$fileName}"; |
| 15 | 16 | if (!file_exists($file)) { |
| 16 | 17 | $file = "{$folderName}{$fileName}"; |
| 17 | - if (!file_exists($file)) |
|
| 18 | - return false; |
|
| 18 | + if (!file_exists($file)) { |
|
| 19 | + return false; |
|
| 20 | + } |
|
| 19 | 21 | } |
| 20 | 22 | return $file; |
| 21 | 23 | } |
@@ -111,8 +113,9 @@ discard block |
||
| 111 | 113 | | |
| 112 | 114 | */ |
| 113 | 115 | |
| 114 | -if ( !is_dir( APPLICATION_PATH ) ) |
|
| 116 | +if ( !is_dir( APPLICATION_PATH ) ) { |
|
| 115 | 117 | _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder."); |
| 118 | +} |
|
| 116 | 119 | |
| 117 | 120 | /* |
| 118 | 121 | |-------------------------------------------------------------------------- |
@@ -15,10 +15,11 @@ |
||
| 15 | 15 | use Whoops\Handler\PlainTextHandler; |
| 16 | 16 | |
| 17 | 17 | $run = new Whoops\Run; |
| 18 | -if (PHP_SAPI === 'cli') |
|
| 18 | +if (PHP_SAPI === 'cli') { |
|
| 19 | 19 | $handler = new PlainTextHandler; |
| 20 | -else |
|
| 20 | +} else { |
|
| 21 | 21 | $handler = new PrettyPageHandler; |
| 22 | +} |
|
| 22 | 23 | |
| 23 | 24 | $run->pushHandler($handler); |
| 24 | 25 | |