phpdoc-parser icon indicating copy to clipboard operation
phpdoc-parser copied to clipboard

Next-gen phpDoc parser with support for intersection types and generics

Results 37 phpdoc-parser issues
Sort by recently updated
recently updated
newest added

I had a brief perusal of the phpdocumenter tag list, and there doesn't seem to be a tag for indicating a method has write operation amongst it list of side...

```php /** * @return array */ function DoThingWithNode(DOMNode $node) : array { /* do stuff here */ } ``` So I have this method that return an array with string...

Proof-of-concept implementation for template default syntax (for phpstan/phpstan#4801)

### Bug report I know the current workaround is to place parenthesis around the return type, but this is problematic, as almost every CS fixer removes the parenthesis. Like `\Closure():...

This is my first experiment in trying to support comments in array shape: ```php array{ // a is for apple a: int, } array{ // a is for apple //...

needed for https://github.com/phpstan/phpstan/issues/8964 based on https://github.com/phpstan/phpstan/issues/8964#issuecomment-1445362737 analysis

### Bug report I'd like to add comment to local type alias (`@phpstan-type`) but it throws "PHPDoc tag @phpstan-type MyNumber has invalid value: Unexpected token "some", expected TOKEN_PHPDOC_EOL at offset..."...

see https://github.com/phpstan/phpstan-src/commit/30f60c18f5efa9e7d5a5495c90f901178cf17a57#r113903510 for repro and the commit itself for usage https://github.com/phpstan/phpstan-src/blob/f2fb222f7e31c6d50e6258b13a73126cccb16364/src/Type/Constant/ConstantFloatType.php#L48 code should be (re)used related with https://github.com/phpstan/phpstan-src/pull/2358