phpsa
phpsa copied to clipboard
[Analyzer] DocBlocks
A collection of things we need to do to fully support docblocks First we need to get missing docblock for properties working: https://github.com/ovr/phpsa/blob/master/src/Compiler/Expression.php#L263
Yes I was trying to support it, but it's not easy as I see
Docblocks is based on NS and needed to create NS context to pass it intro phpdocument
annotations analyzer, review composer.json package to find this extra component
Will be rly cool to have this, will help with protecting and understanding what is the variable type
Seems PHP annotations is needed for:
- Properties
- ClassConstants
- Methods
- Classes
- Traits
- Interfaces
- Functions
And @ as
- @return
- @param
- @throws
- @method
- @deprecated
- @internal
And there are advanced annotations, for example Doctrine, Swagger-PHP or PHPUnit as an example
- [ ] [Analyzer] issue a warning when using something which is annotated with
@deprecated - [ ] [Analyzer] display all found
@todocomments - [ ] [Analyzer] check
@param - [ ] [Analyzer] check
@throws - [ ] [Analyzer] check
@return - [x] #79
- [ ] #80
- [ ] missing-doc analyzer: add check for docblocks of parents/interfaces etc. since they are inherited
to add to the list above:
@todo@var@property@property-read@property-write