@@ -20,7 +20,7 @@ |
||
20 | 20 | * @throws UnknownEndpointException |
21 | 21 | */ |
22 | 22 | public function getEndpoint(string $name, string $version): Endpoint { |
23 | - $className = $this->buildVersionedEndpointNamespace($version) . $name; |
|
23 | + $className = $this->buildVersionedEndpointNamespace($version).$name; |
|
24 | 24 | return new $className($this->entityManager); |
25 | 25 | } |
26 | 26 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | */ |
102 | 102 | public function getMethod() |
103 | 103 | { |
104 | - return $this->method . ($this->instance ? '' : 'All'); |
|
104 | + return $this->method.($this->instance ? '' : 'All'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getEndpoint(string $name, string $version): Endpoint |
27 | 27 | { |
28 | - $className = $this->buildVersionedEndpointNamespace($version) . $name; |
|
28 | + $className = $this->buildVersionedEndpointNamespace($version).$name; |
|
29 | 29 | if (!class_exists($className)) { |
30 | 30 | throw new UnknownEndpointException("Could not find $className"); |
31 | 31 | } |
@@ -54,6 +54,6 @@ discard block |
||
54 | 54 | |
55 | 55 | protected function buildVersionedEndpointNamespace(string $version): string |
56 | 56 | { |
57 | - return $this->endpointNamespace . '\v' . str_replace('.', '_', $version) . '\\'; |
|
57 | + return $this->endpointNamespace.'\v'.str_replace('.', '_', $version).'\\'; |
|
58 | 58 | } |
59 | 59 | } |
@@ -40,10 +40,10 @@ |
||
40 | 40 | public function get($key) |
41 | 41 | { |
42 | 42 | //TODO: Cache the file contents |
43 | - $config = parse_ini_file($this->filename, (bool)$this->nameSpace); |
|
43 | + $config = parse_ini_file($this->filename, (bool) $this->nameSpace); |
|
44 | 44 | |
45 | 45 | if ($config === false) { |
46 | - throw new INIParseException('Could not parse: ' . $this->filename, true); |
|
46 | + throw new INIParseException('Could not parse: '.$this->filename, true); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | if ($this->nameSpace) { |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | try { |
53 | 53 | $response = $this->server->handleRequest($request); |
54 | - header("Content-Type: " . $response->getMIMEType()); |
|
54 | + header("Content-Type: ".$response->getMIMEType()); |
|
55 | 55 | //TODO: Find a way for the Response to specify additional headers (to enable auth, as well as pagination) |
56 | 56 | echo $response->getAsString(); |
57 | 57 | } catch (InvalidAPIKeyException $e) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | protected function executeEndpoint(Endpoint $endpoint, Request $request): ResponseData |
49 | 49 | { |
50 | 50 | if (!method_exists($endpoint, $request->getMethod())) { |
51 | - throw new MethodNotFoundException("The endpoint method " . $request->getMethod() . " was not found"); |
|
51 | + throw new MethodNotFoundException("The endpoint method ".$request->getMethod()." was not found"); |
|
52 | 52 | } |
53 | 53 | return call_user_func([$endpoint, $request->getMethod()], $request); |
54 | 54 | } |