@@ -41,7 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | $request = new RouterMatch; |
43 | 43 | list($request->method, $request->query) = $this->httpMethodParams->get($server, $globals['_GET'], $globals['_POST']); |
44 | - $request->path = $this->schemeHost . parse_url($server['REQUEST_URI'], PHP_URL_PATH); |
|
44 | + $request->path = $this->schemeHost.parse_url($server['REQUEST_URI'], PHP_URL_PATH); |
|
45 | 45 | |
46 | 46 | return $request; |
47 | 47 | } |
@@ -24,6 +24,6 @@ |
||
24 | 24 | { |
25 | 25 | $string = parent::__toString(); |
26 | 26 | |
27 | - return $string . $this->postBody; |
|
27 | + return $string.$this->postBody; |
|
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $this->rename(RouterInterface::class, 'original'); |
24 | 24 | $this->bind(RouterInterface::class)->to(CliRouter::class); |
25 | 25 | $this->bind(TransferInterface::class)->to(CliResponder::class); |
26 | - $stdIn = tempnam(sys_get_temp_dir(), 'stdin-' . crc32(__FILE__)); |
|
26 | + $stdIn = tempnam(sys_get_temp_dir(), 'stdin-'.crc32(__FILE__)); |
|
27 | 27 | $this->bind()->annotatedWith(StdIn::class)->toInstance($stdIn); |
28 | 28 | } |
29 | 29 | } |
@@ -18,15 +18,15 @@ |
||
18 | 18 | public function __invoke(ResourceObject $resourceObject, array $server) |
19 | 19 | { |
20 | 20 | unset($server); |
21 | - if (! $resourceObject->view) { |
|
21 | + if (!$resourceObject->view) { |
|
22 | 22 | $resourceObject->toString(); |
23 | 23 | } |
24 | 24 | // code |
25 | 25 | $statusText = (new Code)->statusText[$resourceObject->code]; |
26 | - $ob = $resourceObject->code . ' ' . $statusText . PHP_EOL; |
|
26 | + $ob = $resourceObject->code.' '.$statusText.PHP_EOL; |
|
27 | 27 | // header |
28 | 28 | foreach ($resourceObject->headers as $label => $value) { |
29 | - $ob .= "{$label}: {$value}" . PHP_EOL; |
|
29 | + $ob .= "{$label}: {$value}".PHP_EOL; |
|
30 | 30 | } |
31 | 31 | // empty line |
32 | 32 | $ob .= PHP_EOL; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | public function addHalLink(array $body, array $methodAnnotations, Hal $hal) : Hal |
42 | 42 | { |
43 | - if (! empty($methodAnnotations)) { |
|
43 | + if (!empty($methodAnnotations)) { |
|
44 | 44 | $hal = $this->linkAnnotation($body, $methodAnnotations, $hal); |
45 | 45 | } |
46 | 46 | if (isset($body['_links'])) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | private function linkAnnotation(array $body, array $methodAnnotations, Hal $hal) : Hal |
54 | 54 | { |
55 | 55 | foreach ($methodAnnotations as $annotation) { |
56 | - if (! $annotation instanceof Link) { |
|
56 | + if (!$annotation instanceof Link) { |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 | $uri = uri_template($annotation->href, $body); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** @var ResourceObject $ro */ |
31 | 31 | $ro = $invocation->proceed(); |
32 | 32 | $isCreated = $ro->code === 201 && isset($ro->headers['Location']); |
33 | - if (! $isCreated) { |
|
33 | + if (!$isCreated) { |
|
34 | 34 | return $ro; |
35 | 35 | } |
36 | 36 | $ro->setRenderer($this->renderer); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | protected function configure() |
31 | 31 | { |
32 | 32 | $this->bind(AbstractAppMeta::class)->toInstance($this->appMeta); |
33 | - $this->bind(AppInterface::class)->to($this->appMeta->name . '\Module\App'); |
|
33 | + $this->bind(AppInterface::class)->to($this->appMeta->name.'\Module\App'); |
|
34 | 34 | $this->bind()->annotatedWith(AppName::class)->toInstance($this->appMeta->name); |
35 | 35 | } |
36 | 36 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | */ |
29 | 29 | public function get() |
30 | 30 | { |
31 | - return new Logger($this->appMeta->name, [new StreamHandler($this->appMeta->logDir . '/app.log', Logger::DEBUG)]); |
|
31 | + return new Logger($this->appMeta->name, [new StreamHandler($this->appMeta->logDir.'/app.log', Logger::DEBUG)]); |
|
32 | 32 | } |
33 | 33 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | private function getParams($method, array $server, array $post) : array |
90 | 90 | { |
91 | 91 | // post data exists |
92 | - if ($method === 'post' && ! empty($post)) { |
|
92 | + if ($method === 'post' && !empty($post)) { |
|
93 | 93 | return $post; |
94 | 94 | } |
95 | 95 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return $put; |
114 | 114 | } |
115 | 115 | $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false; |
116 | - if (! $isApplicationJson) { |
|
116 | + if (!$isApplicationJson) { |
|
117 | 117 | return []; |
118 | 118 | } |
119 | 119 | $content = json_decode(file_get_contents($this->stdIn), true); |