phpDocumentor / phpDocumentor/ReflectionDocBlock
Add @template & Conditional return types
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 9.4k
- Forks
- 137
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 1
Description
https://phpstan.org/writing-php-code/phpdoc-types#conditional-return-types
@template T of int|array
@return (T is int ? static : array)
I am not sure that you support psalm-types too
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked PHPStan conditional return types documentation and inspect how ReflectionDocBlock currently parses @template and @return annotations. Determine whether the shown syntax and Psalm-style types are supported, then use the project's existing type-parsing tests to define the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100