|
@@ -112,10 +112,12 @@ abstract class AbstractGenerator
|
|
|
list($class, $method) = explode('@', $route);
|
|
|
$reflection = new ReflectionClass($class);
|
|
|
$comment = $reflection->getDocComment();
|
|
|
- $phpdoc = new DocBlock($comment);
|
|
|
- foreach ($phpdoc->getTags() as $tag) {
|
|
|
- if ($tag->getName() === 'resource') {
|
|
|
- return $tag->getContent();
|
|
|
+ if ($comment) {
|
|
|
+ $phpdoc = new DocBlock($comment);
|
|
|
+ foreach ($phpdoc->getTags() as $tag) {
|
|
|
+ if ($tag->getName() === 'resource') {
|
|
|
+ return $tag->getContent();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|