Allow only tags in Docblock argument

The array of tags in the docblock constructor should only contain tags.
Some of the factory methods of the tags are returning a null when the tag could not be created.
This causes issues during parsing. By filtering these null values in the factory this use is resolved.
This commit is contained in:
Jaapio
2015-10-26 15:45:03 +01:00
parent 1f637ffba2
commit e516af3a1b
4 changed files with 58 additions and 2 deletions
+1
View File
@@ -61,6 +61,7 @@ final class DocBlock
Assert::string($summary);
Assert::boolean($isTemplateStart);
Assert::boolean($isTemplateEnd);
Assert::allIsInstanceOf($tags, Tag::class);
$this->summary = $summary;
$this->description = $description ?: new DocBlock\Description('');