@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function getCacheDir() |
| 51 | 51 | { |
| 52 | - return $this->getRootDir().'/var/cache/'.$this->environment; |
|
| 52 | + return $this->getRootDir() . '/var/cache/' . $this->environment; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | public function getConfigurationDir() |
| 56 | 56 | { |
| 57 | - return $this->getRootDir().'/config'; |
|
| 57 | + return $this->getRootDir() . '/config'; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function getEnvironment() |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | public function getLogDir() |
| 66 | 66 | { |
| 67 | - return $this->getRootDir().'/var/log'; |
|
| 67 | + return $this->getRootDir() . '/var/log'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function getRootDir() |
@@ -79,25 +79,25 @@ discard block |
||
| 79 | 79 | public function loadConfiguration() |
| 80 | 80 | { |
| 81 | 81 | $app = $this; |
| 82 | - if (file_exists($this->getConfigurationDir().'/container.'.$app->getEnvironment().'.php')) { |
|
| 83 | - require $this->getConfigurationDir().'/container.'.$app->getEnvironment().'.php'; |
|
| 82 | + if (file_exists($this->getConfigurationDir() . '/container.' . $app->getEnvironment() . '.php')) { |
|
| 83 | + require $this->getConfigurationDir() . '/container.' . $app->getEnvironment() . '.php'; |
|
| 84 | 84 | } else { |
| 85 | - require $this->getConfigurationDir().'/container.php'; |
|
| 85 | + require $this->getConfigurationDir() . '/container.php'; |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | public function loadRoutes() |
| 90 | 90 | { |
| 91 | 91 | $app = $this; |
| 92 | - require $this->getConfigurationDir().'/routes.php'; |
|
| 92 | + require $this->getConfigurationDir() . '/routes.php'; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | public function registerControllers() |
| 96 | 96 | { |
| 97 | - if (file_exists($this->getConfigurationDir().'/controllers.php')) { |
|
| 98 | - $controllers = require $this->getConfigurationDir().'/controllers.php'; |
|
| 97 | + if (file_exists($this->getConfigurationDir() . '/controllers.php')) { |
|
| 98 | + $controllers = require $this->getConfigurationDir() . '/controllers.php'; |
|
| 99 | 99 | foreach ($controllers as $key => $class) { |
| 100 | - $this[$key] = function ($app) use ($class) { |
|
| 100 | + $this[$key] = function($app) use ($class) { |
|
| 101 | 101 | return new $class($app); |
| 102 | 102 | }; |
| 103 | 103 | } |
@@ -107,12 +107,12 @@ discard block |
||
| 107 | 107 | public function registerHandlers() |
| 108 | 108 | { |
| 109 | 109 | $app = $this; |
| 110 | - require $this->getConfigurationDir().'/handlers.php'; |
|
| 110 | + require $this->getConfigurationDir() . '/handlers.php'; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | public function registerProviders() |
| 114 | 114 | { |
| 115 | - $providers = require $this->getConfigurationDir().'/providers.php'; |
|
| 115 | + $providers = require $this->getConfigurationDir() . '/providers.php'; |
|
| 116 | 116 | foreach ($providers as $class => $environments) { |
| 117 | 117 | if (isset($environments['all']) || isset($environments[$this->environment])) { |
| 118 | 118 | $this->register(new $class()); |