Completed
Pull Request — master (#328)
by
unknown
01:45
created
src/Mpociot/ApiDoc/Parsers/RuleDescriptionParser.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     }
78 78
 
79 79
     /**
80
-     * @param null $rule
80
+     * @param string $rule
81 81
      *
82 82
      * @return static
83 83
      */
Please login to merge, or discard this 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/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/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/LaravelGenerator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function prepareMiddleware($enable = true)
59 59
     {
60
-        App::instance('middleware.disable', ! $enable);
60
+        App::instance('middleware.disable', !$enable);
61 61
     }
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@
 block discarded – undo
41 41
     /**
42 42
      * Prepares / Disables route middlewares.
43 43
      *
44
-     * @param  bool $disable
45 44
      *
46 45
      * @return  void
47 46
      */
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Generators/AbstractGenerator.php 2 patches
Doc Comments   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * @param Route $route
24 24
      *
25
-     * @return mixed
25
+     * @return string|null
26 26
      */
27 27
     public function getDomain(Route $route)
28 28
     {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @param Route $route
34 34
      *
35
-     * @return mixed
35
+     * @return string
36 36
      */
37 37
     public function getUri(Route $route)
38 38
     {
@@ -109,7 +109,6 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      * Prepares / Disables route middlewares.
111 111
      *
112
-     * @param  bool $disable
113 112
      *
114 113
      * @return  void
115 114
      */
@@ -120,7 +119,7 @@  discard block
 block discarded – undo
120 119
      *
121 120
      * @param array $tags
122 121
      *
123
-     * @return mixed
122
+     * @return null|\Symfony\Component\HttpFoundation\Response
124 123
      */
125 124
     protected function getDocblockResponse($tags)
126 125
     {
@@ -193,7 +192,7 @@  discard block
 block discarded – undo
193 192
     }
194 193
 
195 194
     /**
196
-     * @param  $route
195
+     * @param  Route $route
197 196
      * @param  $bindings
198 197
      * @param  $headers
199 198
      *
@@ -224,7 +223,7 @@  discard block
 block discarded – undo
224 223
      * @param $route
225 224
      * @param array $bindings
226 225
      *
227
-     * @return mixed
226
+     * @return string
228 227
      */
229 228
     protected function addRouteModelBindings($route, $bindings)
230 229
     {
@@ -643,7 +642,7 @@  discard block
 block discarded – undo
643 642
      * @param  string  $rule
644 643
      * @param  string  $parameter
645 644
      *
646
-     * @return array
645
+     * @return string
647 646
      */
648 647
     protected function parseParameters($rule, $parameter)
649 648
     {
@@ -674,7 +673,7 @@  discard block
 block discarded – undo
674 673
     }
675 674
 
676 675
     /**
677
-     * @param $response
676
+     * @param null|\Symfony\Component\HttpFoundation\Response $response
678 677
      *
679 678
      * @return mixed
680 679
      */
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $response = $docblockResponse;
76 76
             $showresponse = true;
77 77
         }
78
-        if (! $response) {
78
+        if (!$response) {
79 79
             $transformerResponse = $this->getTransformerResponse($routeDescription['tags']);
80 80
             if ($transformerResponse) {
81 81
                 // we have a transformer response from the docblock ( @transformer || @transformercollection )
@@ -83,18 +83,18 @@  discard block
 block discarded – undo
83 83
                 $showresponse = true;
84 84
             }
85 85
         }
86
-        if (! $response && $withResponse) {
86
+        if (!$response && $withResponse) {
87 87
             try {
88 88
                 $response = $this->getRouteResponse($route, $bindings, $headers);
89 89
             } catch (\Exception $e) {
90
-                echo "Couldn't get response for route: ".implode(',', $this->getMethods($route)).$route->uri().']: '.$e->getMessage()."\n";
90
+                echo "Couldn't get response for route: " . implode(',', $this->getMethods($route)) . $route->uri() . ']: ' . $e->getMessage() . "\n";
91 91
             }
92 92
         }
93 93
 
94 94
         $content = $this->getResponseContent($response);
95 95
 
96 96
         return $this->getParameters([
97
-            'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))),
97
+            'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))),
98 98
             'resource' => $routeGroup,
99 99
             'title' => $routeDescription['short'],
100 100
             'description' => $routeDescription['long'],
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function getDocblockResponse($tags)
126 126
     {
127
-        $responseTags = array_filter($tags, function ($tag) {
128
-            if (! ($tag instanceof Tag)) {
127
+        $responseTags = array_filter($tags, function($tag) {
128
+            if (!($tag instanceof Tag)) {
129 129
                 return false;
130 130
             }
131 131
 
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
         // Laravel will ignore the nested array rules unless the key referenced exists and is an array
188 188
         // So we'll to create an empty array for each array attribute
189 189
         $values = collect($rules)
190
-            ->filter(function ($values) {
190
+            ->filter(function($values) {
191 191
                 return in_array('array', $values);
192
-            })->map(function ($val, $key) {
192
+            })->map(function($val, $key) {
193 193
                 return [''];
194 194
             })->all();
195 195
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $methods = $this->getMethods($route);
213 213
 
214 214
         // Split headers into key - value pairs
215
-        $headers = collect($headers)->map(function ($value) {
215
+        $headers = collect($headers)->map(function($value) {
216 216
             $split = explode(':', $value); // explode to get key + values
217 217
             $key = array_shift($split); // extract the key and keep the values in the array
218 218
             $value = implode(':', $split); // implode values into string again
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $uri = $this->getUri($route);
238 238
         foreach ($bindings as $model => $id) {
239
-            $uri = str_replace('{'.$model.'}', $id, $uri);
240
-            $uri = str_replace('{'.$model.'?}', $id, $uri);
239
+            $uri = str_replace('{' . $model . '}', $id, $uri);
240
+            $uri = str_replace('{' . $model . '?}', $id, $uri);
241 241
         }
242 242
 
243 243
         return $uri;
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
         foreach ($reflectionMethod->getParameters() as $parameter) {
303 303
             $parameterType = $parameter->getClass();
304
-            if (! is_null($parameterType) && class_exists($parameterType->name)) {
304
+            if (!is_null($parameterType) && class_exists($parameterType->name)) {
305 305
                 $className = $parameterType->name;
306 306
 
307 307
                 if (is_subclass_of($className, FormRequest::class)) {
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
      */
338 338
     protected function fancyImplode($arr, $first, $last)
339 339
     {
340
-        $arr = array_map(function ($value) {
341
-            return '`'.$value.'`';
340
+        $arr = array_map(function($value) {
341
+            return '`' . $value . '`';
342 342
         }, $arr);
343 343
         array_push($arr, implode($last, array_splice($arr, -2)));
344 344
 
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
     protected function splitValuePairs($parameters, $first = 'is ', $last = 'or ')
349 349
     {
350 350
         $attribute = '';
351
-        collect($parameters)->map(function ($item, $key) use (&$attribute, $first, $last) {
352
-            $attribute .= '`'.$item.'` ';
351
+        collect($parameters)->map(function($item, $key) use (&$attribute, $first, $last) {
352
+            $attribute .= '`' . $item . '` ';
353 353
             if (($key + 1) % 2 === 0) {
354 354
                 $attribute .= $last;
355 355
             } else {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                 }
433 433
                 break;
434 434
             case 'between':
435
-                if (! isset($attributeData['type'])) {
435
+                if (!isset($attributeData['type'])) {
436 436
                     $attributeData['type'] = 'numeric';
437 437
                 }
438 438
                 $attributeData['description'][] = Description::parse($rule)->with($parameters)->getDescription();
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
         foreach ($headers as $name => $value) {
611 611
             $name = strtr(strtoupper($name), '-', '_');
612 612
 
613
-            if (! Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
614
-                $name = $prefix.$name;
613
+            if (!Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
614
+                $name = $prefix . $name;
615 615
             }
616 616
 
617 617
             $server[$name] = $value;
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
     protected function getTransformerResponse($tags)
709 709
     {
710 710
         try {
711
-            $transFormerTags = array_filter($tags, function ($tag) {
712
-                if (! ($tag instanceof Tag)) {
711
+            $transFormerTags = array_filter($tags, function($tag) {
712
+                if (!($tag instanceof Tag)) {
713 713
                     return false;
714 714
                 }
715 715
 
@@ -720,8 +720,8 @@  discard block
 block discarded – undo
720 720
                 return false;
721 721
             }
722 722
 
723
-            $modelTag = array_first(array_filter($tags, function ($tag) {
724
-                if (! ($tag instanceof Tag)) {
723
+            $modelTag = array_first(array_filter($tags, function($tag) {
724
+                if (!($tag instanceof Tag)) {
725 725
                     return false;
726 726
                 }
727 727
 
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
             }));
730 730
             $tag = \array_first($transFormerTags);
731 731
             $transformer = $tag->getContent();
732
-            if (! \class_exists($transformer)) {
732
+            if (!\class_exists($transformer)) {
733 733
                 // if we can't find the transformer we can't generate a response
734 734
                 return;
735 735
             }
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
             if (version_compare(PHP_VERSION, '7.0.0') >= 0 && \is_null($type)) {
746 746
                 // we can only get the type with reflection for PHP 7
747 747
                 if ($parameter->hasType() &&
748
-                    ! $parameter->getType()->isBuiltin() &&
748
+                    !$parameter->getType()->isBuiltin() &&
749 749
                     \class_exists((string) $parameter->getType())) {
750 750
                     //we have a type
751 751
                     $type = (string) $parameter->getType();
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
                 || (str_is($routeDomain, $generator->getDomain($route))
279 279
                     && str_is($routePrefix, $generator->getUri($route)))
280 280
                 || in_array($middleware, $route->middleware())
281
-               ) {
281
+                ) {
282 282
                 if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
283 283
                     $parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse && in_array('GET', $generator->getMethods($route)));
284 284
                     $this->info('Processed route: ['.implode(',', $generator->getMethods($route)).'] '.$generator->getUri($route));
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $this->setUserToBeImpersonated($this->option('actAsUserId'));
78 78
 
79
-        if ($routePrefix === null && $routeDomain === null && ! count($allowedRoutes) && $middleware === null) {
79
+        if ($routePrefix === null && $routeDomain === null && !count($allowedRoutes) && $middleware === null) {
80 80
             $this->error('You must provide either a route prefix, a route domain, a route or a middleware to generate the documentation.');
81 81
 
82 82
             return false;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 $parsedRoutes += $this->processRoutes($generator, $allowedRoutes, $routeDomain, $routePrefix, $middleware);
95 95
             }
96 96
         }
97
-        $parsedRoutes = collect($parsedRoutes)->groupBy('resource')->sort(function ($a, $b) {
97
+        $parsedRoutes = collect($parsedRoutes)->groupBy('resource')->sort(function($a, $b) {
98 98
             return strcmp($a->first()['resource'], $b->first()['resource']);
99 99
         });
100 100
 
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
     private function writeMarkdown($parsedRoutes)
110 110
     {
111 111
         $outputPath = $this->option('output');
112
-        $targetFile = $outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'index.md';
113
-        $compareFile = $outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'.compare.md';
112
+        $targetFile = $outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . 'index.md';
113
+        $compareFile = $outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . '.compare.md';
114 114
 
115 115
         $infoText = view('apidoc::partials.info')
116 116
             ->with('outputPath', ltrim($outputPath, 'public/'))
117
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'));
117
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'));
118 118
 
119
-        $parsedRouteOutput = $parsedRoutes->map(function ($routeGroup) {
120
-            return $routeGroup->map(function ($route) {
119
+        $parsedRouteOutput = $parsedRoutes->map(function($routeGroup) {
120
+            return $routeGroup->map(function($route) {
121 121
                 $route['output'] = (string) view('apidoc::partials.route')->with('parsedRoute', $route)->render();
122 122
 
123 123
                 return $route;
@@ -137,16 +137,16 @@  discard block
 block discarded – undo
137 137
                 $frontmatter = trim($generatedFrontmatter[1], "\n");
138 138
             }
139 139
 
140
-            $parsedRouteOutput->transform(function ($routeGroup) use ($generatedDocumentation, $compareDocumentation) {
141
-                return $routeGroup->transform(function ($route) use ($generatedDocumentation, $compareDocumentation) {
142
-                    if (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $generatedDocumentation, $routeMatch)) {
143
-                        $routeDocumentationChanged = (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $compareDocumentation, $compareMatch) && $compareMatch[1] !== $routeMatch[1]);
140
+            $parsedRouteOutput->transform(function($routeGroup) use ($generatedDocumentation, $compareDocumentation) {
141
+                return $routeGroup->transform(function($route) use ($generatedDocumentation, $compareDocumentation) {
142
+                    if (preg_match('/<!-- START_' . $route['id'] . ' -->(.*)<!-- END_' . $route['id'] . ' -->/is', $generatedDocumentation, $routeMatch)) {
143
+                        $routeDocumentationChanged = (preg_match('/<!-- START_' . $route['id'] . ' -->(.*)<!-- END_' . $route['id'] . ' -->/is', $compareDocumentation, $compareMatch) && $compareMatch[1] !== $routeMatch[1]);
144 144
                         if ($routeDocumentationChanged === false || $this->option('force')) {
145 145
                             if ($routeDocumentationChanged) {
146
-                                $this->warn('Discarded manual changes for route ['.implode(',', $route['methods']).'] '.$route['uri']);
146
+                                $this->warn('Discarded manual changes for route [' . implode(',', $route['methods']) . '] ' . $route['uri']);
147 147
                             }
148 148
                         } else {
149
-                            $this->warn('Skipping modified route ['.implode(',', $route['methods']).'] '.$route['uri']);
149
+                            $this->warn('Skipping modified route [' . implode(',', $route['methods']) . '] ' . $route['uri']);
150 150
                             $route['modified_output'] = $routeMatch[0];
151 151
                         }
152 152
                     }
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
             ->with('frontmatter', $frontmatter)
164 164
             ->with('infoText', $infoText)
165 165
             ->with('outputPath', $this->option('output'))
166
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'))
166
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'))
167 167
             ->with('parsedRoutes', $parsedRouteOutput);
168 168
 
169
-        if (! is_dir($outputPath)) {
169
+        if (!is_dir($outputPath)) {
170 170
             $documentarian->create($outputPath);
171 171
         }
172 172
 
@@ -179,23 +179,23 @@  discard block
 block discarded – undo
179 179
             ->with('frontmatter', $frontmatter)
180 180
             ->with('infoText', $infoText)
181 181
             ->with('outputPath', $this->option('output'))
182
-            ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection'))
182
+            ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection'))
183 183
             ->with('parsedRoutes', $parsedRouteOutput);
184 184
 
185 185
         file_put_contents($compareFile, $compareMarkdown);
186 186
 
187
-        $this->info('Wrote index.md to: '.$outputPath);
187
+        $this->info('Wrote index.md to: ' . $outputPath);
188 188
 
189 189
         $this->info('Generating API HTML code');
190 190
 
191 191
         $documentarian->generate($outputPath);
192 192
 
193
-        $this->info('Wrote HTML documentation to: '.$outputPath.'/index.html');
193
+        $this->info('Wrote HTML documentation to: ' . $outputPath . '/index.html');
194 194
 
195 195
         if ($this->option('noPostmanCollection') !== true) {
196 196
             $this->info('Generating Postman collection');
197 197
 
198
-            file_put_contents($outputPath.DIRECTORY_SEPARATOR.'collection.json', $this->generatePostmanCollection($parsedRoutes));
198
+            file_put_contents($outputPath . DIRECTORY_SEPARATOR . 'collection.json', $this->generatePostmanCollection($parsedRoutes));
199 199
         }
200 200
     }
201 201
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     private function setUserToBeImpersonated($actAs)
226 226
     {
227
-        if (! empty($actAs)) {
227
+        if (!empty($actAs)) {
228 228
             if (version_compare($this->laravel->version(), '5.2.0', '<')) {
229 229
                 $userModel = config('auth.model');
230 230
                 $user = $userModel::find($actAs);
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
                ) {
274 274
                 if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
275 275
                     $parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse && in_array('GET', $generator->getMethods($route)));
276
-                    $this->info('Processed route: ['.implode(',', $generator->getMethods($route)).'] '.$generator->getUri($route));
276
+                    $this->info('Processed route: [' . implode(',', $generator->getMethods($route)) . '] ' . $generator->getUri($route));
277 277
                 } else {
278
-                    $this->warn('Skipping route: ['.implode(',', $generator->getMethods($route)).'] '.$generator->getUri($route));
278
+                    $this->warn('Skipping route: [' . implode(',', $generator->getMethods($route)) . '] ' . $generator->getUri($route));
279 279
                 }
280 280
             }
281 281
         }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      */
291 291
     private function isValidRoute(Route $route)
292 292
     {
293
-        return ! is_callable($route->getAction()['uses']) && ! is_null($route->getAction()['uses']);
293
+        return !is_callable($route->getAction()['uses']) && !is_null($route->getAction()['uses']);
294 294
     }
295 295
 
296 296
     /**
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             $phpdoc = new DocBlock($comment);
308 308
 
309 309
             return collect($phpdoc->getTags())
310
-                ->filter(function ($tag) use ($route) {
310
+                ->filter(function($tag) use ($route) {
311 311
                     return $tag->getName() === 'hideFromAPIDocumentation';
312 312
                 })
313 313
                 ->isEmpty();
Please login to merge, or discard this patch.