@@ -331,7 +331,7 @@ |
||
| 331 | 331 | { |
| 332 | 332 | $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'SERVER_NAME', 'SERVER_ADDR']; |
| 333 | 333 | $sourceTransformations = [ |
| 334 | - "HTTP_X_FORWARDED_HOST" => function ($value) { |
|
| 334 | + "HTTP_X_FORWARDED_HOST" => function($value) { |
|
| 335 | 335 | $elements = explode(',', $value); |
| 336 | 336 | return trim(end($elements)); |
| 337 | 337 | }, |
@@ -363,6 +363,13 @@ |
||
| 363 | 363 | * @return string |
| 364 | 364 | */ |
| 365 | 365 | // @codingStandardsIgnoreStart |
| 366 | + |
|
| 367 | + /** |
|
| 368 | + * @param string $type |
|
| 369 | + * @param integer $message |
|
| 370 | + * @param integer $line |
|
| 371 | + * @param string $file |
|
| 372 | + */ |
|
| 366 | 373 | protected static function renderErrorText($type, $message, $line, $file) |
| 367 | 374 | { |
| 368 | 375 | return $message . ' in ' . $file . ' on line ' . $line; |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | * Set the specified config item |
| 136 | 136 | * |
| 137 | 137 | * @param string $key |
| 138 | - * @param mixed $value |
|
| 138 | + * @param string $value |
|
| 139 | 139 | * @return void |
| 140 | 140 | * |
| 141 | 141 | * @throws \Kotori\Exception\ConfigException |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | $_REQUEST = array_merge($_POST, $_GET, $_COOKIE); |
| 194 | 194 | |
| 195 | 195 | if (Container::get('config')->get('app_debug')) { |
| 196 | - Container::get('response')->setHeader('X-Kotori-Hash', call_user_func(function () { |
|
| 196 | + Container::get('response')->setHeader('X-Kotori-Hash', call_user_func(function() { |
|
| 197 | 197 | $lockFile = Helper::getComposerVendorPath() . '/../composer.lock'; |
| 198 | 198 | if (!Helper::isFile($lockFile)) { |
| 199 | 199 | return 'unknown'; |
@@ -307,7 +307,7 @@ |
||
| 307 | 307 | * |
| 308 | 308 | * @param mixed $class |
| 309 | 309 | * @param string $methodName |
| 310 | - * @return mixed |
|
| 310 | + * @return null|callable |
|
| 311 | 311 | * |
| 312 | 312 | * @throws \Kotori\Exception\NotFoundException |
| 313 | 313 | */ |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | namespace Kotori\Core\Model; |
| 33 | 33 | |
| 34 | -use Kotori\Debug\Hook; |
|
| 35 | 34 | use Kotori\Core\Container; |
| 35 | +use Kotori\Debug\Hook; |
|
| 36 | 36 | use Kotori\Exception\NotFoundException; |
| 37 | 37 | |
| 38 | 38 | class Provider |