Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Variable always defined when needed #9426

@chrisjenkinson

Description

@chrisjenkinson

Bug description

In the attached code snippet the variable $b is only used on line 17 when it must have been defined earlier on line 13. However, PHPStan says it might not have been defined.

Code snippet that reproduces the problem

https://phpstan.org/r/ed67e44e-c68b-4d25-8610-b4a8dc0e25e1

Expected output

Issue detected when no issue should be detected.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions