diff --git a/src/DocBlock.php b/src/DocBlock.php index 956d52b..06c0b5d 100644 --- a/src/DocBlock.php +++ b/src/DocBlock.php @@ -175,9 +175,11 @@ final class DocBlock $result = []; foreach ($this->getTagsByName($name) as $tag) { - if ($tag instanceof TagWithType) { - $result[] = $tag; + if (!$tag instanceof TagWithType) { + continue; } + + $result[] = $tag; } return $result; diff --git a/tests/unit/DocBlockTest.php b/tests/unit/DocBlockTest.php index 96d6e57..af31e73 100644 --- a/tests/unit/DocBlockTest.php +++ b/tests/unit/DocBlockTest.php @@ -14,7 +14,6 @@ declare(strict_types=1); namespace phpDocumentor\Reflection; use Mockery as m; -use phpDocumentor\Reflection\DocBlock\Tags\Author; use phpDocumentor\Reflection\DocBlock\Tags\Deprecated; use phpDocumentor\Reflection\Types\Context; use phpDocumentor\Reflection\Types\String_; @@ -23,7 +22,7 @@ use PHPUnit\Framework\TestCase; /** * @uses \Webmozart\Assert\Assert * - * @coversDefaultClass phpDocumentor\Reflection\DocBlock + * @coversDefaultClass \phpDocumentor\Reflection\DocBlock * @covers :: */ class DocBlockTest extends TestCase