Completed
Pull Request — master (#319)
by Marcel
50:03 queued 41:52
created
src/Mpociot/ApiDoc/Parsers/RuleDescriptionParser.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
     public function with($parameters)
35 35
     {
36 36
         is_array($parameters) ?
37
-            $this->parameters += $parameters :
38
-            $this->parameters[] = $parameters;
37
+            $this->parameters += $parameters : $this->parameters[] = $parameters;
39 38
 
40 39
         return $this;
41 40
     }
@@ -54,8 +53,7 @@  discard block
 block discarded – undo
54 53
     protected function makeDescription()
55 54
     {
56 55
         $description = trans()->hasForLocale($this->rule) ?
57
-                            trans()->get($this->rule) :
58
-                            trans()->get($this->rule, [], self::DEFAULT_LOCALE);
56
+                            trans()->get($this->rule) : trans()->get($this->rule, [], self::DEFAULT_LOCALE);
59 57
 
60 58
         return $this->replaceAttributes($description);
61 59
     }
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/ApiDocGeneratorServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function boot()
17 17
     {
18
-        $this->loadViewsFrom(__DIR__.'/../../resources/views/', 'apidoc');
19
-        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'apidoc');
18
+        $this->loadViewsFrom(__DIR__ . '/../../resources/views/', 'apidoc');
19
+        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'apidoc');
20 20
 
21 21
         $this->publishes([
22
-            __DIR__.'/../../resources/lang' => $this->resource_path('lang/vendor/apidoc'),
23
-            __DIR__.'/../../resources/views' => $this->resource_path('views/vendor/apidoc'),
22
+            __DIR__ . '/../../resources/lang' => $this->resource_path('lang/vendor/apidoc'),
23
+            __DIR__ . '/../../resources/views' => $this->resource_path('views/vendor/apidoc'),
24 24
         ]);
25 25
     }
26 26
 
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function register()
33 33
     {
34
-        $this->app->singleton('apidoc.generate', function () {
34
+        $this->app->singleton('apidoc.generate', function() {
35 35
             return new GenerateDocumentation();
36 36
         });
37
-        $this->app->singleton('apidoc.update', function () {
37
+        $this->app->singleton('apidoc.update', function() {
38 38
             return new UpdateDocumentation();
39 39
         });
40 40
 
@@ -53,6 +53,6 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function resource_path($path = '')
55 55
     {
56
-        return app()->basePath().'/resources'.($path ? '/'.$path : $path);
56
+        return app()->basePath() . '/resources' . ($path ? '/' . $path : $path);
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Postman/CollectionWriter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
                 'description' => '',
33 33
                 'schema' => 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',
34 34
             ],
35
-            'item' => $this->routeGroups->map(function ($routes, $groupName) {
35
+            'item' => $this->routeGroups->map(function($routes, $groupName) {
36 36
                 return [
37 37
                     'name' => $groupName,
38 38
                     'description' => '',
39
-                    'item' => $routes->map(function ($route) {
39
+                    'item' => $routes->map(function($route) {
40 40
                         return [
41 41
                             'name' => $route['title'] != '' ? $route['title'] : url($route['uri']),
42 42
                             'request' => [
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                                 'method' => $route['methods'][0],
45 45
                                 'body' => [
46 46
                                     'mode' => 'formdata',
47
-                                    'formdata' => collect($route['parameters'])->map(function ($parameter, $key) {
47
+                                    'formdata' => collect($route['parameters'])->map(function($parameter, $key) {
48 48
                                         return [
49 49
                                             'key' => $key,
50 50
                                             'value' => isset($parameter['value']) ? $parameter['value'] : '',
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $this->setUserToBeImpersonated($this->option('actAsUserId'));
77 77
 
78
-        if ($routePrefix === null && $routeDomain === null && ! count($allowedRoutes) && $middleware === null) {
78
+        if ($routePrefix === null && $routeDomain === null && !count($allowedRoutes) && $middleware === null) {
79 79
             $this->error('You must provide either a route prefix, a route domain, a route or a middleware to generate the documentation.');
80 80
 
81 81
             return false;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 }
102 102
             }
103 103
         }
104
-        $parsedRoutes = collect($parsedRoutes)->groupBy('resource')->sort(function ($a, $b) {
104
+        $parsedRoutes = collect($parsedRoutes)->groupBy('resource')->sort(function($a, $b) {
105 105
             return strcmp($a->first()['resource'], $b->first()['resource']);
106 106
         });
107 107
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
     private function writeMarkdown($parsedRoutes)
117 117
     {
118 118
         $outputPath = $this->option('output');
119
-        $targetFile = $outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'index.md';
120
-        $compareFile = $outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'.compare.md';
119
+        $targetFile = $outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . 'index.md';
120
+        $compareFile = $outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . '.compare.md';
121 121
 
122 122
         $infoText = view('apidoc::partials.info')
123 123
             ->with('outputPath', ltrim($outputPath, 'public/'))
124
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'));
124
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'));
125 125
 
126
-        $parsedRouteOutput = $parsedRoutes->map(function ($routeGroup) {
127
-            return $routeGroup->map(function ($route) {
126
+        $parsedRouteOutput = $parsedRoutes->map(function($routeGroup) {
127
+            return $routeGroup->map(function($route) {
128 128
                 $route['output'] = (string) view('apidoc::partials.route')->with('parsedRoute', $route)->render();
129 129
 
130 130
                 return $route;
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
                 $frontmatter = trim($generatedFrontmatter[1], "\n");
145 145
             }
146 146
 
147
-            $parsedRouteOutput->transform(function ($routeGroup) use ($generatedDocumentation, $compareDocumentation) {
148
-                return $routeGroup->transform(function ($route) use ($generatedDocumentation, $compareDocumentation) {
149
-                    if (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $generatedDocumentation, $routeMatch)) {
150
-                        $routeDocumentationChanged = (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $compareDocumentation, $compareMatch) && $compareMatch[1] !== $routeMatch[1]);
147
+            $parsedRouteOutput->transform(function($routeGroup) use ($generatedDocumentation, $compareDocumentation) {
148
+                return $routeGroup->transform(function($route) use ($generatedDocumentation, $compareDocumentation) {
149
+                    if (preg_match('/<!-- START_' . $route['id'] . ' -->(.*)<!-- END_' . $route['id'] . ' -->/is', $generatedDocumentation, $routeMatch)) {
150
+                        $routeDocumentationChanged = (preg_match('/<!-- START_' . $route['id'] . ' -->(.*)<!-- END_' . $route['id'] . ' -->/is', $compareDocumentation, $compareMatch) && $compareMatch[1] !== $routeMatch[1]);
151 151
                         if ($routeDocumentationChanged === false || $this->option('force')) {
152 152
                             if ($routeDocumentationChanged) {
153
-                                $this->warn('Discarded manual changes for route ['.implode(',', $route['methods']).'] '.$route['uri']);
153
+                                $this->warn('Discarded manual changes for route [' . implode(',', $route['methods']) . '] ' . $route['uri']);
154 154
                             }
155 155
                         } else {
156
-                            $this->warn('Skipping modified route ['.implode(',', $route['methods']).'] '.$route['uri']);
156
+                            $this->warn('Skipping modified route [' . implode(',', $route['methods']) . '] ' . $route['uri']);
157 157
                             $route['modified_output'] = $routeMatch[0];
158 158
                         }
159 159
                     }
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
             ->with('frontmatter', $frontmatter)
171 171
             ->with('infoText', $infoText)
172 172
             ->with('outputPath', $this->option('output'))
173
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'))
173
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'))
174 174
             ->with('parsedRoutes', $parsedRouteOutput);
175 175
 
176
-        if (! is_dir($outputPath)) {
176
+        if (!is_dir($outputPath)) {
177 177
             $documentarian->create($outputPath);
178 178
         }
179 179
 
@@ -186,23 +186,23 @@  discard block
 block discarded – undo
186 186
             ->with('frontmatter', $frontmatter)
187 187
             ->with('infoText', $infoText)
188 188
             ->with('outputPath', $this->option('output'))
189
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'))
189
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'))
190 190
             ->with('parsedRoutes', $parsedRouteOutput);
191 191
 
192 192
         file_put_contents($compareFile, $compareMarkdown);
193 193
 
194
-        $this->info('Wrote index.md to: '.$outputPath);
194
+        $this->info('Wrote index.md to: ' . $outputPath);
195 195
 
196 196
         $this->info('Generating API HTML code');
197 197
 
198 198
         $documentarian->generate($outputPath);
199 199
 
200
-        $this->info('Wrote HTML documentation to: '.$outputPath.'/index.html');
200
+        $this->info('Wrote HTML documentation to: ' . $outputPath . '/index.html');
201 201
 
202 202
         if ($this->option('noPostmanCollection') !== true) {
203 203
             $this->info('Generating Postman collection');
204 204
 
205
-            file_put_contents($outputPath.DIRECTORY_SEPARATOR.'collection.json', $this->generatePostmanCollection($parsedRoutes));
205
+            file_put_contents($outputPath . DIRECTORY_SEPARATOR . 'collection.json', $this->generatePostmanCollection($parsedRoutes));
206 206
         }
207 207
     }
208 208
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     private function setUserToBeImpersonated($actAs)
232 232
     {
233
-        if (! empty($actAs)) {
233
+        if (!empty($actAs)) {
234 234
             if (version_compare($this->laravel->version(), '5.2.0', '<')) {
235 235
                 $userModel = config('auth.model');
236 236
                 $user = $userModel::find($actAs);
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
                ) {
279 279
                 if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
280 280
                     $parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse && in_array('GET', $generator->getMethods($route)));
281
-                    $this->info('Processed route: ['.implode(',', $generator->getMethods($route)).'] '.$generator->getUri($route));
281
+                    $this->info('Processed route: [' . implode(',', $generator->getMethods($route)) . '] ' . $generator->getUri($route));
282 282
                 } else {
283
-                    $this->warn('Skipping route: ['.implode(',', $generator->getMethods($route)).'] '.$generator->getUri($route));
283
+                    $this->warn('Skipping route: [' . implode(',', $generator->getMethods($route)) . '] ' . $generator->getUri($route));
284 284
                 }
285 285
             }
286 286
         }
@@ -312,9 +312,9 @@  discard block
 block discarded – undo
312 312
                ) {
313 313
                 if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
314 314
                     $parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse && in_array('GET', $generator->getMethods($route)));
315
-                    $this->info('Processed route: ['.implode(',', $generator->getMethods($route)).'] '.$route->uri());
315
+                    $this->info('Processed route: [' . implode(',', $generator->getMethods($route)) . '] ' . $route->uri());
316 316
                 } else {
317
-                    $this->warn('Skipping route: ['.implode(',', $generator->getMethods($route)).'] '.$route->uri());
317
+                    $this->warn('Skipping route: [' . implode(',', $generator->getMethods($route)) . '] ' . $route->uri());
318 318
                 }
319 319
             }
320 320
         }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     private function isValidRoute($route)
331 331
     {
332
-        return ! is_callable($route->getAction()['uses']) && ! is_null($route->getAction()['uses']);
332
+        return !is_callable($route->getAction()['uses']) && !is_null($route->getAction()['uses']);
333 333
     }
334 334
 
335 335
     /**
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             $phpdoc = new DocBlock($comment);
347 347
 
348 348
             return collect($phpdoc->getTags())
349
-                ->filter(function ($tag) use ($route) {
349
+                ->filter(function($tag) use ($route) {
350 350
                     return $tag->getName() === 'hideFromAPIDocumentation';
351 351
                 })
352 352
                 ->isEmpty();
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Commands/UpdateDocumentation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
         $documentarian = new Documentarian();
46 46
 
47
-        if (! is_dir($outputPath)) {
48
-            $this->error('There is no generated documentation available at '.$outputPath.'.');
47
+        if (!is_dir($outputPath)) {
48
+            $this->error('There is no generated documentation available at ' . $outputPath . '.');
49 49
 
50 50
             return false;
51 51
         }
@@ -53,6 +53,6 @@  discard block
 block discarded – undo
53 53
 
54 54
         $documentarian->generate($outputPath);
55 55
 
56
-        $this->info('Wrote HTML documentation to: '.$outputPath.'/index.html');
56
+        $this->info('Wrote HTML documentation to: ' . $outputPath . '/index.html');
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Generators/LaravelGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function prepareMiddleware($enable = true)
65 65
     {
66
-        App::instance('middleware.disable', ! $enable);
66
+        App::instance('middleware.disable', !$enable);
67 67
     }
68 68
 
69 69
     /**
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
     protected function getTransformerResponse($tags)
110 110
     {
111 111
         try {
112
-            $transFormerTags = array_filter($tags, function ($tag) {
113
-                if (! ($tag instanceof Tag)) {
112
+            $transFormerTags = array_filter($tags, function($tag) {
113
+                if (!($tag instanceof Tag)) {
114 114
                     return false;
115 115
                 }
116 116
 
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                 return false;
122 122
             }
123 123
 
124
-            $modelTag = array_first(array_filter($tags, function ($tag) {
125
-                if (! ($tag instanceof Tag)) {
124
+            $modelTag = array_first(array_filter($tags, function($tag) {
125
+                if (!($tag instanceof Tag)) {
126 126
                     return false;
127 127
                 }
128 128
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             }));
131 131
             $tag = \array_first($transFormerTags);
132 132
             $transformer = $tag->getContent();
133
-            if (! \class_exists($transformer)) {
133
+            if (!\class_exists($transformer)) {
134 134
                 // if we can't find the transformer we can't generate a response
135 135
                 return;
136 136
             }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             if (version_compare(PHP_VERSION, '7.0.0') >= 0 && \is_null($type)) {
147 147
                 // we can only get the type with reflection for PHP 7
148 148
                 if ($parameter->hasType() &&
149
-                ! $parameter->getType()->isBuiltin() &&
149
+                !$parameter->getType()->isBuiltin() &&
150 150
                 \class_exists((string) $parameter->getType())) {
151 151
                     //we have a type
152 152
                     $type = (string) $parameter->getType();
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Generators/DingoGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $dispatcher = app('Dingo\Api\Dispatcher')->raw();
27 27
 
28
-        collect($server)->map(function ($key, $value) use ($dispatcher) {
28
+        collect($server)->map(function($key, $value) use ($dispatcher) {
29 29
             $dispatcher->header($value, $key);
30 30
         });
31 31
 
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Generators/AbstractGenerator.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $showresponse = true;
65 65
             $content = $response->getContent();
66 66
         }
67
-        if (! $response) {
67
+        if (!$response) {
68 68
             $transformerResponse = $this->getTransformerResponse($routeDescription['tags']);
69 69
             if ($transformerResponse) {
70 70
                 // we have a transformer response from the docblock ( @transformer || @transformercollection )
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 $content = $response->getContent();
74 74
             }
75 75
         }
76
-        if (! $response && $withResponse) {
76
+        if (!$response && $withResponse) {
77 77
             try {
78 78
                 $response = $this->getRouteResponse($route, $bindings, $headers);
79 79
                 if ($response->headers->get('Content-Type') === 'application/json') {
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
                     $content = $response->getContent();
83 83
                 }
84 84
             } catch (\Exception $e) {
85
-                dump("Couldn't get response for route: ".implode(',', $this->getMethods($route)).'] '.$route->uri().'', $e);
85
+                dump("Couldn't get response for route: " . implode(',', $this->getMethods($route)) . '] ' . $route->uri() . '', $e);
86 86
             }
87 87
         }
88 88
 
89 89
         return $this->getParameters([
90
-            'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))),
90
+            'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))),
91 91
             'resource' => $routeGroup,
92 92
             'title' => $routeDescription['short'],
93 93
             'description' => $routeDescription['long'],
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function getDocblockResponse($tags)
119 119
     {
120
-        $responseTags = array_filter($tags, function ($tag) {
121
-            if (! ($tag instanceof Tag)) {
120
+        $responseTags = array_filter($tags, function($tag) {
121
+            if (!($tag instanceof Tag)) {
122 122
                 return false;
123 123
             }
124 124
 
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
         }
177 177
 
178 178
         $values = collect($simplifiedRules)
179
-            ->filter(function ($values) {
179
+            ->filter(function($values) {
180 180
                 return in_array('array', $values);
181
-            })->map(function ($val, $key) {
181
+            })->map(function($val, $key) {
182 182
                 return [''];
183 183
             })->all();
184 184
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $methods = $this->getMethods($route);
200 200
 
201 201
         // Split headers into key - value pairs
202
-        $headers = collect($headers)->map(function ($value) {
202
+        $headers = collect($headers)->map(function($value) {
203 203
             $split = explode(':', $value); // explode to get key + values
204 204
             $key = array_shift($split); // extract the key and keep the values in the array
205 205
             $value = implode(':', $split); // implode values into string again
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
     {
224 224
         $uri = $this->getUri($route);
225 225
         foreach ($bindings as $model => $id) {
226
-            $uri = str_replace('{'.$model.'}', $id, $uri);
227
-            $uri = str_replace('{'.$model.'?}', $id, $uri);
226
+            $uri = str_replace('{' . $model . '}', $id, $uri);
227
+            $uri = str_replace('{' . $model . '?}', $id, $uri);
228 228
         }
229 229
 
230 230
         return $uri;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
         foreach ($reflectionMethod->getParameters() as $parameter) {
290 290
             $parameterType = $parameter->getClass();
291
-            if (! is_null($parameterType) && class_exists($parameterType->name)) {
291
+            if (!is_null($parameterType) && class_exists($parameterType->name)) {
292 292
                 $className = $parameterType->name;
293 293
 
294 294
                 if (is_subclass_of($className, FormRequest::class)) {
@@ -324,8 +324,8 @@  discard block
 block discarded – undo
324 324
      */
325 325
     protected function fancyImplode($arr, $first, $last)
326 326
     {
327
-        $arr = array_map(function ($value) {
328
-            return '`'.$value.'`';
327
+        $arr = array_map(function($value) {
328
+            return '`' . $value . '`';
329 329
         }, $arr);
330 330
         array_push($arr, implode($last, array_splice($arr, -2)));
331 331
 
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
     protected function splitValuePairs($parameters, $first = 'is ', $last = 'or ')
336 336
     {
337 337
         $attribute = '';
338
-        collect($parameters)->map(function ($item, $key) use (&$attribute, $first, $last) {
339
-            $attribute .= '`'.$item.'` ';
338
+        collect($parameters)->map(function($item, $key) use (&$attribute, $first, $last) {
339
+            $attribute .= '`' . $item . '` ';
340 340
             if (($key + 1) % 2 === 0) {
341 341
                 $attribute .= $last;
342 342
             } else {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                 }
411 411
                 break;
412 412
             case 'between':
413
-                if (! isset($attributeData['type'])) {
413
+                if (!isset($attributeData['type'])) {
414 414
                     $attributeData['type'] = 'numeric';
415 415
                 }
416 416
                 $attributeData['description'][] = Description::parse($rule)->with($parameters)->getDescription();
@@ -578,8 +578,8 @@  discard block
 block discarded – undo
578 578
         foreach ($headers as $name => $value) {
579 579
             $name = strtr(strtoupper($name), '-', '_');
580 580
 
581
-            if (! Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
582
-                $name = $prefix.$name;
581
+            if (!Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
582
+                $name = $prefix . $name;
583 583
             }
584 584
 
585 585
             $server[$name] = $value;
Please login to merge, or discard this patch.