@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->setUserToBeImpersonated($this->option('actAsUserId')); |
| 66 | 66 | |
| 67 | - if ($routePrefix === null && ! count($allowedRoutes)) { |
|
| 67 | + if ($routePrefix === null && !count($allowedRoutes)) { |
|
| 68 | 68 | $this->error('You must provide either a route prefix or a route to generate the documentation.'); |
| 69 | 69 | |
| 70 | 70 | return false; |
@@ -93,28 +93,28 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $markdown = view('apidoc::documentarian') |
| 95 | 95 | ->with('outputPath', $this->option('output')) |
| 96 | - ->with('showPostmanCollectionButton', ! $this->option('noPostmanCollection')) |
|
| 96 | + ->with('showPostmanCollectionButton', !$this->option('noPostmanCollection')) |
|
| 97 | 97 | ->with('parsedRoutes', $parsedRoutes->all()); |
| 98 | 98 | |
| 99 | - if (! is_dir($outputPath)) { |
|
| 99 | + if (!is_dir($outputPath)) { |
|
| 100 | 100 | $documentarian->create($outputPath); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - file_put_contents($outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'index.md', $markdown); |
|
| 103 | + file_put_contents($outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . 'index.md', $markdown); |
|
| 104 | 104 | |
| 105 | - $this->info('Wrote index.md to: '.$outputPath); |
|
| 105 | + $this->info('Wrote index.md to: ' . $outputPath); |
|
| 106 | 106 | |
| 107 | 107 | $this->info('Generating API HTML code'); |
| 108 | 108 | |
| 109 | 109 | $documentarian->generate($outputPath); |
| 110 | 110 | |
| 111 | - $this->info('Wrote HTML documentation to: '.$outputPath.'/public/index.html'); |
|
| 111 | + $this->info('Wrote HTML documentation to: ' . $outputPath . '/public/index.html'); |
|
| 112 | 112 | |
| 113 | 113 | |
| 114 | 114 | if ($this->option('noPostmanCollection') !== true) { |
| 115 | 115 | $this->info('Generating Postman collection'); |
| 116 | 116 | |
| 117 | - file_put_contents($outputPath.DIRECTORY_SEPARATOR.'collection.json', $this->generatePostmanCollection($parsedRoutes)); |
|
| 117 | + file_put_contents($outputPath . DIRECTORY_SEPARATOR . 'collection.json', $this->generatePostmanCollection($parsedRoutes)); |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | private function setUserToBeImpersonated($actAs) |
| 144 | 144 | { |
| 145 | - if (! empty($actAs)) { |
|
| 145 | + if (!empty($actAs)) { |
|
| 146 | 146 | if (version_compare($this->laravel->version(), '5.2.0', '<')) { |
| 147 | 147 | $userModel = config('auth.model'); |
| 148 | 148 | $user = $userModel::find($actAs); |
@@ -184,9 +184,9 @@ discard block |
||
| 184 | 184 | if (in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->getUri())) { |
| 185 | 185 | if ($this->isValidRoute($route)) { |
| 186 | 186 | $parsedRoutes[] = $generator->processRoute($route, $bindings, $withResponse); |
| 187 | - $this->info('Processed route: '.$route->getUri()); |
|
| 187 | + $this->info('Processed route: ' . $route->getUri()); |
|
| 188 | 188 | } else { |
| 189 | - $this->warn('Skipping route: '.$route->getUri().' - contains closure.'); |
|
| 189 | + $this->warn('Skipping route: ' . $route->getUri() . ' - contains closure.'); |
|
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | foreach ($routes as $route) { |
| 211 | 211 | if (empty($allowedRoutes) || in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->uri())) { |
| 212 | 212 | $parsedRoutes[] = $generator->processRoute($route, $bindings, $withResponse); |
| 213 | - $this->info('Processed route: '.$route->uri()); |
|
| 213 | + $this->info('Processed route: ' . $route->uri()); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | private function isValidRoute($route) |
| 226 | 226 | { |
| 227 | - return ! is_callable($route->getAction()['uses']); |
|
| 227 | + return !is_callable($route->getAction()['uses']); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /** |