|
@@ -70,7 +70,7 @@ discard block |
|
|
block discarded – undo |
|
70
|
70
|
|
|
71
|
71
|
$groupedRoutes = collect($parsedRoutes) |
|
72
|
72
|
->groupBy('metadata.groupName') |
|
73
|
|
- ->sortBy(static function ($group) { |
|
|
73
|
+ ->sortBy(static function($group) { |
|
74
|
74
|
/* @var $group Collection */ |
|
75
|
75
|
return $group->first()['metadata']['groupName']; |
|
76
|
76
|
}, SORT_NATURAL); |
|
@@ -101,23 +101,23 @@ discard block |
|
|
block discarded – undo |
|
101
|
101
|
$routePath = $generator->getUri($route); |
|
102
|
102
|
|
|
103
|
103
|
if ($this->isClosureRoute($route->getAction())) { |
|
104
|
|
- $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).': Closure routes are not supported.'); |
|
|
104
|
+ $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ': Closure routes are not supported.'); |
|
105
|
105
|
continue; |
|
106
|
106
|
} |
|
107
|
107
|
|
|
108
|
108
|
$routeControllerAndMethod = Utils::getRouteClassAndMethodNames($route->getAction()); |
|
109
|
|
- if (! $this->isValidRoute($routeControllerAndMethod)) { |
|
|
109
|
+ if (!$this->isValidRoute($routeControllerAndMethod)) { |
|
110
|
110
|
$this->warn(sprintf($messageFormat, 'Skipping invalid', $routeMethods, $routePath)); |
|
111
|
111
|
continue; |
|
112
|
112
|
} |
|
113
|
113
|
|
|
114
|
|
- if (! $this->doesControllerMethodExist($routeControllerAndMethod)) { |
|
115
|
|
- $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).': Controller method does not exist.'); |
|
|
114
|
+ if (!$this->doesControllerMethodExist($routeControllerAndMethod)) { |
|
|
115
|
+ $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ': Controller method does not exist.'); |
|
116
|
116
|
continue; |
|
117
|
117
|
} |
|
118
|
118
|
|
|
119
|
|
- if (! $this->isRouteVisibleForDocumentation($routeControllerAndMethod)) { |
|
120
|
|
- $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).': @hideFromAPIDocumentation was specified.'); |
|
|
119
|
+ if (!$this->isRouteVisibleForDocumentation($routeControllerAndMethod)) { |
|
|
120
|
+ $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ': @hideFromAPIDocumentation was specified.'); |
|
121
|
121
|
continue; |
|
122
|
122
|
} |
|
123
|
123
|
|
|
@@ -125,7 +125,7 @@ discard block |
|
|
block discarded – undo |
|
125
|
125
|
$parsedRoutes[] = $generator->processRoute($route, $routeItem->getRules()); |
|
126
|
126
|
$this->info(sprintf($messageFormat, 'Processed', $routeMethods, $routePath)); |
|
127
|
127
|
} catch (\Exception $exception) { |
|
128
|
|
- $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).'- Exception '.get_class($exception).' encountered : '.$exception->getMessage()); |
|
|
128
|
+ $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . '- Exception ' . get_class($exception) . ' encountered : ' . $exception->getMessage()); |
|
129
|
129
|
} |
|
130
|
130
|
} |
|
131
|
131
|
|
|
@@ -143,7 +143,7 @@ discard block |
|
|
block discarded – undo |
|
143
|
143
|
$routeControllerAndMethod = implode('@', $routeControllerAndMethod); |
|
144
|
144
|
} |
|
145
|
145
|
|
|
146
|
|
- return ! is_callable($routeControllerAndMethod) && ! is_null($routeControllerAndMethod); |
|
|
146
|
+ return !is_callable($routeControllerAndMethod) && !is_null($routeControllerAndMethod); |
|
147
|
147
|
} |
|
148
|
148
|
|
|
149
|
149
|
/** |
|
@@ -169,7 +169,7 @@ discard block |
|
|
block discarded – undo |
|
169
|
169
|
[$class, $method] = $routeControllerAndMethod; |
|
170
|
170
|
$reflection = new ReflectionClass($class); |
|
171
|
171
|
|
|
172
|
|
- if (! $reflection->hasMethod($method)) { |
|
|
172
|
+ if (!$reflection->hasMethod($method)) { |
|
173
|
173
|
return false; |
|
174
|
174
|
} |
|
175
|
175
|
|
|
@@ -194,7 +194,7 @@ discard block |
|
|
block discarded – undo |
|
194
|
194
|
$phpdoc = new DocBlock($comment); |
|
195
|
195
|
|
|
196
|
196
|
return collect($phpdoc->getTags()) |
|
197
|
|
- ->filter(function ($tag) { |
|
|
197
|
+ ->filter(function($tag) { |
|
198
|
198
|
return $tag->getName() === 'hideFromAPIDocumentation'; |
|
199
|
199
|
}) |
|
200
|
200
|
->isEmpty(); |