@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | protected $ignorePath = [SUDA_SYSTEM]; |
| 13 | 13 | protected $backtrace; |
| 14 | 14 | |
| 15 | - public function __construct(array $backtrace, array $ignorePath =[]) |
|
| 15 | + public function __construct(array $backtrace, array $ignorePath = []) |
|
| 16 | 16 | { |
| 17 | 17 | $this->ignorePath = array_merge($this->ignorePath, $ignorePath); |
| 18 | 18 | $rc = new \ReflectionClass(LoggerTrait::class); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $this->backtrace = $backtrace; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function getCallerTrace():?array |
|
| 26 | + public function getCallerTrace(): ?array |
|
| 27 | 27 | { |
| 28 | 28 | foreach ($this->backtrace as $trace) { |
| 29 | 29 | if (array_key_exists('file', $trace)) { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function log($level, $message, array $context = []) |
| 31 | 31 | { |
| 32 | 32 | if (Debug::compare($level, $this->level) >= 0) { |
| 33 | - print date('Y-m-d H:i:s') . ' ' . $this->interpolate($message, $context) . PHP_EOL; |
|
| 33 | + print date('Y-m-d H:i:s').' '.$this->interpolate($message, $context).PHP_EOL; |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $replace = []; |
| 45 | 45 | foreach ($context as $key => $val) { |
| 46 | - $replace['{' . $key . '}'] = $val; |
|
| 46 | + $replace['{'.$key.'}'] = $val; |
|
| 47 | 47 | } |
| 48 | 48 | return strtr($message, $replace); |
| 49 | 49 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | protected function prepare(Request $request, Response $response) |
| 66 | 66 | { |
| 67 | - $response->setHeader('x-powered-by', 'suda/' . SUDA_VERSION, true); |
|
| 67 | + $response->setHeader('x-powered-by', 'suda/'.SUDA_VERSION, true); |
|
| 68 | 68 | $response->getWrapper()->register(ExceptionContentWrapper::class, [Throwable::class]); |
| 69 | 69 | $response->getWrapper()->register(TemplateWrapper::class, [RawTemplate::class]); |
| 70 | 70 | $this->setCatcher(new RequestDumper($this, $request, $response)); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if (!$appResponse->isSend()) { |
| 126 | 126 | $appResponse->end(); |
| 127 | 127 | } |
| 128 | - $this->debug->info('responded with code ' . $appResponse->getStatus()); |
|
| 128 | + $this->debug->info('responded with code '.$appResponse->getStatus()); |
|
| 129 | 129 | $this->debug->timeEnd('sending response'); |
| 130 | 130 | } catch (Throwable $e) { |
| 131 | 131 | $this->debug->uncaughtException($e); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | public function request(array $method, string $name, string $url, array $attributes = []) |
| 149 | 149 | { |
| 150 | 150 | $route = $attributes['config'] ?? []; |
| 151 | - $runnable = RunnableRequestProcessor::class . '->onRequest'; |
|
| 151 | + $runnable = RunnableRequestProcessor::class.'->onRequest'; |
|
| 152 | 152 | if (array_key_exists('class', $route)) { |
| 153 | 153 | $attributes['class'] = $route['class']; |
| 154 | 154 | } elseif (array_key_exists('source', $route)) { |