@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $this->bind(RouterInterface::class)->to(CliRouter::class); |
| 27 | 27 | $this->bind(TransferInterface::class)->to(CliResponder::class); |
| 28 | 28 | $this->bind(HttpCacheInterface::class)->to(CliHttpCache::class); |
| 29 | - $stdIn = tempnam(sys_get_temp_dir(), 'stdin-' . crc32(__FILE__)); |
|
| 29 | + $stdIn = tempnam(sys_get_temp_dir(), 'stdin-'.crc32(__FILE__)); |
|
| 30 | 30 | $this->bind()->annotatedWith(StdIn::class)->toInstance($stdIn); |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | return $this->routeNotFound(); |
| 44 | 44 | } |
| 45 | - if (! $match instanceof NullMatch) { |
|
| 45 | + if (!$match instanceof NullMatch) { |
|
| 46 | 46 | return $match; |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | protected function configure(): void |
| 28 | 28 | { |
| 29 | 29 | $this->bind(AbstractAppMeta::class)->toInstance($this->appMeta); |
| 30 | - $this->bind(AppInterface::class)->to($this->appMeta->name . '\Module\App')->in(Scope::SINGLETON); |
|
| 30 | + $this->bind(AppInterface::class)->to($this->appMeta->name.'\Module\App')->in(Scope::SINGLETON); |
|
| 31 | 31 | $this->bind()->annotatedWith(AppName::class)->toInstance($this->appMeta->name); |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | private function getParams(string $method, array $server, array $post): array |
| 116 | 116 | { |
| 117 | 117 | // post data exists |
| 118 | - if ($method === 'post' && ! empty($post)) { |
|
| 118 | + if ($method === 'post' && !empty($post)) { |
|
| 119 | 119 | return $post; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false; |
| 148 | - if (! $isApplicationJson) { |
|
| 148 | + if (!$isApplicationJson) { |
|
| 149 | 149 | return []; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $ro = $invocation->proceed(); |
| 29 | 29 | assert($ro instanceof ResourceObject); |
| 30 | 30 | $isCreated = $ro->code === 201 && isset($ro->headers['Location']); |
| 31 | - if (! $isCreated) { |
|
| 31 | + if (!$isCreated) { |
|
| 32 | 32 | return $ro; |
| 33 | 33 | } |
| 34 | 34 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function toString(): string |
| 30 | 30 | { |
| 31 | - $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL; |
|
| 31 | + $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).PHP_EOL; |
|
| 32 | 32 | |
| 33 | 33 | return $this->view; |
| 34 | 34 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function __construct(Throwable $e) |
| 25 | 25 | { |
| 26 | 26 | // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName |
| 27 | - $this->ref = hash('crc32b', get_class($e) . $e->getMessage() . $e->getFile() . $e->getLine()); |
|
| 27 | + $this->ref = hash('crc32b', get_class($e).$e->getMessage().$e->getFile().$e->getLine()); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function __toString(): string |
@@ -37,11 +37,11 @@ |
||
| 37 | 37 | $output = $isModified ? $this->getOutput($ro, $server) : $this->condResponse->getOutput($ro->headers); |
| 38 | 38 | |
| 39 | 39 | $statusText = (new Code())->statusText[$ro->code] ?? ''; |
| 40 | - $ob = $output->code . ' ' . $statusText . PHP_EOL; |
|
| 40 | + $ob = $output->code.' '.$statusText.PHP_EOL; |
|
| 41 | 41 | |
| 42 | 42 | // header |
| 43 | 43 | foreach ($output->headers as $label => $value) { |
| 44 | - $ob .= "{$label}: {$value}" . PHP_EOL; |
|
| 44 | + $ob .= "{$label}: {$value}".PHP_EOL; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // empty line |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | public function toString(): string |
| 30 | 30 | { |
| 31 | - $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL; |
|
| 31 | + $this->view = json_encode($this->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).PHP_EOL; |
|
| 32 | 32 | |
| 33 | 33 | return $this->view; |
| 34 | 34 | } |