Completed
Pull Request — master (#576)
by
unknown
02:02
created
src/Tools/ResponseStrategies/ResponseCallStrategy.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public function __invoke(Route $route, array $tags, array $routeProps)
29 29
     {
30 30
         $rulesToApply = $routeProps['rules']['response_calls'] ?? [];
31
-        if (! $this->shouldMakeApiCall($route, $rulesToApply)) {
31
+        if (!$this->shouldMakeApiCall($route, $rulesToApply)) {
32 32
             return null;
33 33
         }
34 34
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         try {
39 39
             $response = [$this->makeApiCall($request)];
40 40
         } catch (\Exception $e) {
41
-            echo 'Exception thrown during response call for ['.implode(',', $route->methods)."] {$route->uri}.\n";
41
+            echo 'Exception thrown during response call for [' . implode(',', $route->methods) . "] {$route->uri}.\n";
42 42
             if (Flags::$shouldBeVerbose) {
43 43
                 Utils::dumpException($e);
44 44
             } else {
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
         // set URL and query parameters
176 176
         $uri = $request->getRequestUri();
177 177
         $query = $request->getQueryString();
178
-        if (! empty($query)) {
178
+        if (!empty($query)) {
179 179
             $uri .= "?$query";
180 180
         }
181 181
         $response = call_user_func_array([$dispatcher, strtolower($request->method())], [$uri]);
182 182
 
183 183
         // the response from the Dingo dispatcher is the 'raw' response from the controller,
184 184
         // so we have to ensure it's JSON first
185
-        if (! $response instanceof Response) {
185
+        if (!$response instanceof Response) {
186 186
             $response = response()->json($response);
187 187
         }
188 188
 
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
         $prefix = 'HTTP_';
332 332
         foreach ($headers as $name => $value) {
333 333
             $name = strtr(strtoupper($name), '-', '_');
334
-            if (! Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
335
-                $name = $prefix.$name;
334
+            if (!Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
335
+                $name = $prefix . $name;
336 336
             }
337 337
             $server[$name] = $value;
338 338
         }
Please login to merge, or discard this patch.