Skip to content

Incorrect 'Variable $value might not be defined.' #14117

@MacGritsch

Description

@MacGritsch

Bug report

The variable $value is definitely defined as the last if-statement (in which the variable is defined) is equal to the one in which it is used.

Code snippet that reproduces the problem

https://phpstan.org/r/1636b1d8-db9b-4247-a407-9d2a60a0b81e

Expected output

No issue should be shown becaue variable is defined.

Did PHPStan help you today? Did it make you happy in any way?

Its a gereat tool! Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions