I rewrote the docblock logic to better support testing, more types (like union and intersection types) and merging signature types (all the build in stuff) with docblock types.
The logic for merging docblocks with signature works as follows
if there is no docblock, use signature types
if there is a docblock, prefer docblock types over signature types (because docblocks support more types like string[])
The factories return an array of Methods (phpDocumentor\Reflection\DocBlock package) for the provided class. In the future these could be used for actions.
This code currently isn't used anywhere, but you can test it with the test command. I will add tests soon.
Thanks for your contribution!
However, I just published a new version with additional tests and I think it should cover your use cases. Feel free to open an issue if you encounter any issues.
I rewrote the docblock logic to better support testing, more types (like union and intersection types) and merging signature types (all the build in stuff) with docblock types.
The logic for merging docblocks with signature works as follows
The factories return an array of Methods (phpDocumentor\Reflection\DocBlock package) for the provided class. In the future these could be used for actions.
This code currently isn't used anywhere, but you can test it with the test command. I will add tests soon.