@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | public function send() |
| 78 | 78 | { |
| 79 | 79 | foreach ($this->headers as $key => $value) { |
| 80 | - header("$key: " . implode(',', $value)); |
|
| 80 | + header("$key: ".implode(',', $value)); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if($this->hasHeader('Content-Type') === false) { |
|
| 83 | + if ($this->hasHeader('Content-Type') === false) { |
|
| 84 | 84 | header(vsprintf( |
| 85 | 85 | 'Content-Type: %s', |
| 86 | 86 | $this->hasHeader('Content-Type') ? $this->getHeader('Content-Type') : [$this->contentType] |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($this->compression) { |
| 94 | 94 | ob_start('ob_gzhandler'); |
| 95 | 95 | } |
| 96 | - echo (string)$this->getBody(); |
|
| 96 | + echo (string) $this->getBody(); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
@@ -102,6 +102,6 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function __toString() |
| 104 | 104 | { |
| 105 | - return (string)$this->getBody(); |
|
| 105 | + return (string) $this->getBody(); |
|
| 106 | 106 | } |
| 107 | 107 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function getConfigPath() |
| 103 | 103 | { |
| 104 | - return $this->getPath() . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config'; |
|
| 104 | + return $this->getPath().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config'; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -130,13 +130,13 @@ discard block |
||
| 130 | 130 | $container->add('app', $this); |
| 131 | 131 | $container->add('registry', $container); |
| 132 | 132 | |
| 133 | - $container->add('config', function () { |
|
| 133 | + $container->add('config', function() { |
|
| 134 | 134 | return new Config($this->getConfigPath(), 'prod'); |
| 135 | 135 | }); |
| 136 | 136 | |
| 137 | 137 | $this->config = $container->make('config'); |
| 138 | 138 | |
| 139 | - $container->add('routes', function () { |
|
| 139 | + $container->add('routes', function() { |
|
| 140 | 140 | return new Collection(); |
| 141 | 141 | }); |
| 142 | 142 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | protected function registerServices() |
| 167 | 167 | { |
| 168 | - $services = array_filter($this->config->get('app.services'), function ($service) { |
|
| 168 | + $services = array_filter($this->config->get('app.services'), function($service) { |
|
| 169 | 169 | return class_exists($service); |
| 170 | 170 | }); |
| 171 | 171 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | protected function loadRoutes() |
| 198 | 198 | { |
| 199 | 199 | $router = $this->container->make('routes'); |
| 200 | - $routes = realpath($this->getPath() . '/app/routes.php'); |
|
| 200 | + $routes = realpath($this->getPath().'/app/routes.php'); |
|
| 201 | 201 | |
| 202 | 202 | if (file_exists($routes)) { |
| 203 | 203 | require $routes; |