@@ -158,7 +158,7 @@ |
||
158 | 158 | { |
159 | 159 | list(, $method, $uri) = $globals['argv']; |
160 | 160 | $urlQuery = parse_url($uri, PHP_URL_QUERY); |
161 | - $urlPath = parse_url($uri, PHP_URL_PATH); |
|
161 | + $urlPath = parse_url($uri, PHP_URL_PATH); |
|
162 | 162 | $query = []; |
163 | 163 | if ($urlQuery) { |
164 | 164 | parse_str($urlQuery, $query); |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | |
50 | 50 | private function renderHal(ResourceObject $ro) : ResourceObject |
51 | 51 | { |
52 | - $method = 'on' . ucfirst($ro->uri->method); |
|
52 | + $method = 'on'.ucfirst($ro->uri->method); |
|
53 | 53 | $annotations = $this->reader->getMethodAnnotations(new \ReflectionMethod($ro, $method)); |
54 | 54 | |
55 | 55 | [$ro, $body] = $this->valuate($ro); |
56 | 56 | /* @var $annotations Link[] */ |
57 | 57 | /* @var $ro ResourceObject */ |
58 | 58 | $hal = $this->getHal($ro->uri, $body, $annotations); |
59 | - $ro->view = $hal->asJson(true) . PHP_EOL; |
|
59 | + $ro->view = $hal->asJson(true).PHP_EOL; |
|
60 | 60 | |
61 | 61 | return $ro; |
62 | 62 | } |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | */ |
84 | 84 | private function isDifferentSchema(ResourceObject $parentRo, ResourceObject $childRo) : bool |
85 | 85 | { |
86 | - return $parentRo->uri->scheme . $parentRo->uri->host !== $childRo->uri->scheme . $childRo->uri->host; |
|
86 | + return $parentRo->uri->scheme.$parentRo->uri->host !== $childRo->uri->scheme.$childRo->uri->host; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | private function getHal(AbstractUri $uri, array $body, array $annotations) : Hal |
90 | 90 | { |
91 | - $query = $uri->query ? '?' . http_build_query($uri->query) : ''; |
|
92 | - $path = $uri->path . $query; |
|
91 | + $query = $uri->query ? '?'.http_build_query($uri->query) : ''; |
|
92 | + $path = $uri->path.$query; |
|
93 | 93 | $selfLink = $this->link->getReverseLink($path); |
94 | 94 | |
95 | 95 | $hal = new Hal($selfLink, $body); |