mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Fix issue when processing invalid tags
When invalid tags are processed a null was returned causing all kind of issues in the normal behavior of this libary. As a solution a generic tag could be created. But that would just drop the error information in. Therefore a new tag was introduced, `invalidTag` the tag is just like the generic tag but does contain the error triggered during the creation of the tag. Which might help applications like phpdocumentor to display validation issues.
This commit is contained in:
@@ -69,10 +69,7 @@ class DescriptionFactory
|
||||
$tags = [];
|
||||
|
||||
for ($i = 1; $i < $count; $i += 2) {
|
||||
$tag = $this->tagFactory->create($tokens[$i], $context);
|
||||
if ($tag !== null) {
|
||||
$tags[] = $tag;
|
||||
}
|
||||
$tags[] = $this->tagFactory->create($tokens[$i], $context);
|
||||
$tokens[$i] = '%' . ++$tagCount . '$s';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user