@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function __invoke(Route $route, array $tags, array $routeProps) |
| 30 | 30 | { |
| 31 | 31 | $rulesToApply = $routeProps['rules']['response_calls'] ?? []; |
| 32 | - if (! $this->shouldMakeApiCall($route, $rulesToApply)) { |
|
| 32 | + if (!$this->shouldMakeApiCall($route, $rulesToApply)) { |
|
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | try { |
| 40 | 40 | $response = [$this->makeApiCall($request)]; |
| 41 | 41 | } catch (\Exception $e) { |
| 42 | - echo 'Exception thrown during response call for ['.implode(',', $route->methods)."] {$route->uri}.\n"; |
|
| 42 | + echo 'Exception thrown during response call for [' . implode(',', $route->methods) . "] {$route->uri}.\n"; |
|
| 43 | 43 | if (Flags::$shouldBeVerbose) { |
| 44 | 44 | $handler = new Handler; |
| 45 | 45 | $handler->setInspector(new Inspector($e)); |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | // set URL and query parameters |
| 180 | 180 | $uri = $request->getRequestUri(); |
| 181 | 181 | $query = $request->getQueryString(); |
| 182 | - if (! empty($query)) { |
|
| 182 | + if (!empty($query)) { |
|
| 183 | 183 | $uri .= "?$query"; |
| 184 | 184 | } |
| 185 | 185 | $response = call_user_func_array([$dispatcher, strtolower($request->method())], [$uri]); |
| 186 | 186 | |
| 187 | 187 | // the response from the Dingo dispatcher is the 'raw' response from the controller, |
| 188 | 188 | // so we have to ensure it's JSON first |
| 189 | - if (! $response instanceof Response) { |
|
| 189 | + if (!$response instanceof Response) { |
|
| 190 | 190 | $response = response()->json($response); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -335,8 +335,8 @@ discard block |
||
| 335 | 335 | $prefix = 'HTTP_'; |
| 336 | 336 | foreach ($headers as $name => $value) { |
| 337 | 337 | $name = strtr(strtoupper($name), '-', '_'); |
| 338 | - if (! starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') { |
|
| 339 | - $name = $prefix.$name; |
|
| 338 | + if (!starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') { |
|
| 339 | + $name = $prefix . $name; |
|
| 340 | 340 | } |
| 341 | 341 | $server[$name] = $value; |
| 342 | 342 | } |