@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $this->setUserToBeImpersonated($this->option('actAsUserId')); |
| 63 | 63 | |
| 64 | - if ($routePrefix === null && ! count($allowedRoutes)) { |
|
| 64 | + if ($routePrefix === null && !count($allowedRoutes)) { |
|
| 65 | 65 | $this->error('You must provide either a route prefix or a route to generate the documentation.'); |
| 66 | 66 | |
| 67 | 67 | return false; |
@@ -90,19 +90,19 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $markdown = view('apidoc::documentarian')->with('parsedRoutes', $parsedRoutes->all()); |
| 92 | 92 | |
| 93 | - if (! is_dir($outputPath)) { |
|
| 93 | + if (!is_dir($outputPath)) { |
|
| 94 | 94 | $documentarian->create($outputPath); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - file_put_contents($outputPath.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR.'index.md', $markdown); |
|
| 97 | + file_put_contents($outputPath . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR . 'index.md', $markdown); |
|
| 98 | 98 | |
| 99 | - $this->info('Wrote index.md to: '.$outputPath); |
|
| 99 | + $this->info('Wrote index.md to: ' . $outputPath); |
|
| 100 | 100 | |
| 101 | 101 | $this->info('Generating API HTML code'); |
| 102 | 102 | |
| 103 | 103 | $documentarian->generate($outputPath); |
| 104 | 104 | |
| 105 | - $this->info('Wrote HTML documentation to: '.$outputPath.'/public/index.html'); |
|
| 105 | + $this->info('Wrote HTML documentation to: ' . $outputPath . '/public/index.html'); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | private function setUserToBeImpersonated($actAs) |
| 131 | 131 | { |
| 132 | - if (! empty($actAs)) { |
|
| 132 | + if (!empty($actAs)) { |
|
| 133 | 133 | if (version_compare($this->laravel->version(), '5.2.0', '<')) { |
| 134 | 134 | $userModel = config('auth.model'); |
| 135 | 135 | $user = $userModel::find($actAs); |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | if (in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->getUri())) { |
| 171 | 171 | if ($this->isValidRoute($route)) { |
| 172 | 172 | $parsedRoutes[] = $generator->processRoute($route, $bindings); |
| 173 | - $this->info('Processed route: '.$route->getUri()); |
|
| 173 | + $this->info('Processed route: ' . $route->getUri()); |
|
| 174 | 174 | } else { |
| 175 | - $this->warn('Skipping route: '.$route->getUri().' - contains closure.'); |
|
| 175 | + $this->warn('Skipping route: ' . $route->getUri() . ' - contains closure.'); |
|
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | foreach ($routes as $route) { |
| 196 | 196 | if (empty($allowedRoutes) || in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->uri())) { |
| 197 | 197 | $parsedRoutes[] = $generator->processRoute($route, $bindings); |
| 198 | - $this->info('Processed route: '.$route->uri()); |
|
| 198 | + $this->info('Processed route: ' . $route->uri()); |
|
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
@@ -209,6 +209,6 @@ discard block |
||
| 209 | 209 | */ |
| 210 | 210 | private function isValidRoute($route) |
| 211 | 211 | { |
| 212 | - return ! is_callable($route->getAction()['uses']); |
|
| 212 | + return !is_callable($route->getAction()['uses']); |
|
| 213 | 213 | } |
| 214 | 214 | } |