Check tag body has a value before trying to access it as an string array

This commit is contained in:
Roberto Espinoza
2017-08-08 08:39:58 +02:00
committed by Jaapio
parent 183824db76
commit 4aada1f93c
2 changed files with 3 additions and 2 deletions
@@ -23,6 +23,7 @@ final class DocblocksWithAnnotationsTest extends \PHPUnit_Framework_TestCase
/**
* @var \DateTime[]
* @Groups({"a", "b"})
* @ORM\Entity
*/
DOCCOMMENT;
@@ -30,6 +31,6 @@ DOCCOMMENT;
$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);
$this->assertCount(2, $docblock->getTags());
$this->assertCount(3, $docblock->getTags());
}
}