@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function __invoke(Route $route, array $tags, array $routeProps) |
| 28 | 28 | { |
| 29 | 29 | $rulesToApply = $routeProps['rules']['response_calls'] ?? []; |
| 30 | - if (! $this->shouldMakeApiCall($route, $rulesToApply)) { |
|
| 30 | + if (!$this->shouldMakeApiCall($route, $rulesToApply)) { |
|
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | try { |
| 38 | 38 | $response = [$this->makeApiCall($request)]; |
| 39 | 39 | } catch (\Exception $e) { |
| 40 | - echo 'Exception thrown during response call for ['.implode(',', $route->methods)."] {$route->uri}.\n"; |
|
| 40 | + echo 'Exception thrown during response call for [' . implode(',', $route->methods) . "] {$route->uri}.\n"; |
|
| 41 | 41 | if (Flags::$shouldBeVerbose) { |
| 42 | 42 | Utils::dumpException($e); |
| 43 | 43 | } else { |
@@ -174,14 +174,14 @@ discard block |
||
| 174 | 174 | // set URL and query parameters |
| 175 | 175 | $uri = $request->getRequestUri(); |
| 176 | 176 | $query = $request->getQueryString(); |
| 177 | - if (! empty($query)) { |
|
| 177 | + if (!empty($query)) { |
|
| 178 | 178 | $uri .= "?$query"; |
| 179 | 179 | } |
| 180 | 180 | $response = call_user_func_array([$dispatcher, strtolower($request->method())], [$uri]); |
| 181 | 181 | |
| 182 | 182 | // the response from the Dingo dispatcher is the 'raw' response from the controller, |
| 183 | 183 | // so we have to ensure it's JSON first |
| 184 | - if (! $response instanceof Response) { |
|
| 184 | + if (!$response instanceof Response) { |
|
| 185 | 185 | $response = response()->json($response); |
| 186 | 186 | } |
| 187 | 187 | |
@@ -330,8 +330,8 @@ discard block |
||
| 330 | 330 | $prefix = 'HTTP_'; |
| 331 | 331 | foreach ($headers as $name => $value) { |
| 332 | 332 | $name = strtr(strtoupper($name), '-', '_'); |
| 333 | - if (! starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') { |
|
| 334 | - $name = $prefix.$name; |
|
| 333 | + if (!starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') { |
|
| 334 | + $name = $prefix . $name; |
|
| 335 | 335 | } |
| 336 | 336 | $server[$name] = $value; |
| 337 | 337 | } |