diff --git a/src/Tools/Generator.php b/src/Tools/Generator.php index 000025a1..2316be00 100644 --- a/src/Tools/Generator.php +++ b/src/Tools/Generator.php @@ -57,7 +57,6 @@ public function processRoute(Route $route, array $rulesToApply = []) $controller = new ReflectionClass($class); $method = $controller->getMethod($method); - $docBlock = $this->parseDocBlock($method); list($routeGroupName, $routeGroupDescription, $routeTitle) = $this->getRouteGroup($controller, $docBlock); $bodyParameters = $this->getBodyParameters($method, $docBlock['tags']); @@ -278,7 +277,7 @@ protected function parseDocBlock(ReflectionMethod $method) protected function getRouteGroup(ReflectionClass $controller, array $methodDocBlock) { // @group tag on the method overrides that on the controller - if (!empty($methodDocBlock['tags'])) { + if (! empty($methodDocBlock['tags'])) { foreach ($methodDocBlock['tags'] as $tag) { if ($tag->getName() === 'group') { $routeGroupParts = explode("\n", trim($tag->getContent())); @@ -304,6 +303,7 @@ protected function getRouteGroup(ReflectionClass $controller, array $methodDocBl if (empty($methodDocBlock['short'])) { return [$routeGroupName, '', $routeGroupDescription]; } + return [$routeGroupName, $routeGroupDescription, $methodDocBlock['short']]; } } diff --git a/tests/Fixtures/TestController.php b/tests/Fixtures/TestController.php index e41d849b..9266ea9a 100644 --- a/tests/Fixtures/TestController.php +++ b/tests/Fixtures/TestController.php @@ -59,7 +59,6 @@ public function withGroupOverride3() * @group Group C * * Group description after group. - * */ public function withGroupOverride4() {