Skip to content

[PHP 8] Nested ternary operator needs to have parentheses around it : false positive ? #3942

@gnutix

Description

@gnutix

Bug report

I have a code containing parenthesis and the issue is still reported.

Code snippet that reproduces the problem

https://phpstan.org/r/99e27548-b5ef-4701-be1b-4586579014f5

To fix it, I changed it to : https://phpstan.org/r/c34635a9-801a-46fc-a0c4-b28421dc7ed0

Expected output

No errors. Even more as this error cannot be ignored in the baseline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions