Skip to content

Commit

Permalink
Fixed docblock parsing on methods that have a @return tag
Browse files Browse the repository at this point in the history
  • Loading branch information
richard.gooding committed Aug 29, 2015
1 parent ba42681 commit 4cf7a0c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Console/ConsoleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Cubex\Cubex;
use Cubex\ICubexAware;
use phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Tag\ParamTag;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -106,11 +107,11 @@ protected function createFromActionableMethod(\ReflectionClass $class)
$descriptions = [];
foreach($propBlock->getTags() as $tag)
{
/**
* @var $tag \phpDocumentor\Reflection\DocBlock\Tag\ParamTag
*/
$tagName = substr($tag->getVariableName(), 1);
$descriptions[$tagName] = $tag->getDescription();
if($tag instanceof ParamTag)
{
$tagName = substr($tag->getVariableName(), 1);
$descriptions[$tagName] = $tag->getDescription();
}
}

foreach($method->getParameters() as $paramNum => $parameter)
Expand Down

0 comments on commit 4cf7a0c

Please sign in to comment.