Commit Graph
10 Commits
Author SHA1 Message Date
Jaapio 518be131c0 Bugfix: resolve issue with multiline descriptions
The phpstan parser is not consuming the full description when parsing
docblocks with a more complex description. For them it's mostlikely not an
issue as phpstan doesn't use the descriptions. But it will also parse
the descriptions into unexpected tags. This could be an advantage but is
not according to the phpdoc spec.

Our own tokenizer is already tokenizing the docblocks into the correct parts.
So all we needed to do is assume all remaining tokens in the phpstan ast belong
to the description. From there our own code is able to handle this as before in
v5.3.

fixes #365
2024-05-08 20:49:40 +02:00
Jaapio fc9a2339f2 Implement fallback option for params without variable 2024-03-20 21:57:07 +01:00
Jaapio 5e4ff887c6 Bump psalm 2022-03-29 22:06:36 +02:00
jrfnl c269e1b26e Psalm: remove suppression of return type issue
... and fix it instead.
2021-08-08 21:32:57 +02:00
jrfnl 93198fae49 Psalm: suppress notice about preg_split $flags
As discussed in the PR:
> > Argument 4 of preg_split expects 0|1|2|3|4|5|6|7, parent type int provided (see https://psalm.dev/193)
>
> I believe this issue is for the `phpDocumentor\Reflection\Utils` class and expects the `pregSplit()` method to apply input validation to the value received for `$flags` before passing it off to the PHP native `preg_split()` function.
>
> IMO that's taking things a little too far as PHP will handle this internally without errors.
> See: https://3v4l.org/NdDRK
2021-08-08 21:32:56 +02:00
jrfnl b7f9b17881 Psalm: suppress two notices
The current version of Psalm flags the following issues:
```
ERROR: InvalidReturnType - src\Utils.php:44:16 - The declared return type 'array<array-key, string>' for phpDocumentor\Reflection\Utils::pregSplit is incorrect, got 'list<list<int|string>|string>' (see https://psalm.dev/011)
     * @return string[] Returns an array containing substrings of subject split along boundaries matched by pattern

ERROR: InvalidReturnStatement - src\Utils.php:55:16 - The inferred type 'list<list<int|string>|string>' does not match the declared return type 'array<array-key, string>' for phpDocumentor\Reflection\Utils::pregSplit (see https://psalm.dev/128)
        return $parts;
```

I'm suggest ignoring this as `list` isn't an officially supported type.
2021-08-08 21:32:56 +02:00
Orklah 9724d359e9 change somes things for SA 2020-02-22 12:03:05 +01:00
Orklah 43288974a5 small fixes 2020-02-20 21:26:56 +01:00
Orklah ada1b6be7f bump phpstan to master. Fixed ignored errors 2020-02-10 21:41:22 +01:00
Jaapio 09e086ecf1 Cleanup build files 2019-09-26 21:19:59 +02:00