Closed
Description
Issue
Parsing a generic doc-block tag that has a body with contents 0
will not be interpreted as actual tag.
Affected versions
Can reproduce in:
- 4.3.0 (latest stable)
- 5.0.0-alpha3 (latest release)
- current master (90ae750)
Reproduction
/**
* @arbitrary-tag 0
*/
class Foo {
}
$reflection = new \ReflectionClass(\Foo::class);
$docComment = $reflection->getDocComment();
$factory = phpDocumentor\Reflection\DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);
echo '>';
echo (string) $docblock->getTags()[0];
echo '<';
Output
><
Expected behaviour
The tag description should be treated as string with contents 0
.
Actual behaviour
The tag description is being treated as null
.
Metadata
Metadata
Assignees
Labels
No labels