Skip to content
Discussion options

You must be logged in to vote

Hi, this is very complicated code. Although PHPStan sometimes understands this pattern (https://phpstan.org/r/db0fcf36-3ee1-4b13-9764-b261161fecbd), it apparently doesn't work when isset and ?? are involved.

Fortunately you can rewrite it to equivalent code that's straightforward to understand: https://phpstan.org/r/d3eade46-0d77-49e1-984d-cdf60d9211b9

Feel free to open a new issue - a feature request, so that it can be tracked with similar issues (https://github.com/phpstan/phpstan/milestone/12). You'll get notified when PHPStan starts to understand it as well :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@janbarasek
Comment options

Answer selected by janbarasek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants