@@ -14,7 +14,8 @@ |
||
| 14 | 14 | * |
| 15 | 15 | * @return ResponseInterface |
| 16 | 16 | */ |
| 17 | - public function run() { |
|
| 17 | + public function run() |
|
| 18 | + { |
|
| 18 | 19 | $request = $this->getRequest(); |
| 19 | 20 | if (!$request) { |
| 20 | 21 | throw new \RuntimeException("Request object is not set for controller"); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | try { |
| 42 | 42 | $args = isset($route->args) ? |
| 43 | - $route->args : |
|
| 44 | - $this->getFunctionArgs($route, new \ReflectionMethod($this, $method)); |
|
| 43 | + $route->args : $this->getFunctionArgs($route, new \ReflectionMethod($this, $method)); |
|
| 45 | 44 | } catch (\RuntimeException $e) { |
| 46 | 45 | return $this->setResponseError(400, 'Bad Request'); |
| 47 | 46 | } |
@@ -168,8 +168,7 @@ |
||
| 168 | 168 | $data = json_encode($data); |
| 169 | 169 | |
| 170 | 170 | return $this->isJsonp() ? |
| 171 | - $this->getRequest()->getQueryParams()['callback'] . '(' . $data . ')' : |
|
| 172 | - $data; |
|
| 171 | + $this->getRequest()->getQueryParams()['callback'] . '(' . $data . ')' : $data; |
|
| 173 | 172 | } |
| 174 | 173 | |
| 175 | 174 | /** |
@@ -274,7 +274,7 @@ |
||
| 274 | 274 | * @return ResponseInterface $response |
| 275 | 275 | */ |
| 276 | 276 | public function error($message, $code = 400) |
| 277 | - { |
|
| 277 | + { |
|
| 278 | 278 | $response = $this->getResponse(); |
| 279 | 279 | |
| 280 | 280 | $errorResponse = $response->withStatus($code); |