Skip to content

@phpstan-assert-if-true affects inferred function call result with strict rules #8351

@InvisibleSmiley

Description

@InvisibleSmiley

Bug report

@phpstan-assert-if-true should only affect the assertion, not the function call result

Code snippet that reproduces the problem

https://phpstan.org/r/085804e9-c27d-435e-904a-d3609d02f0df

Expected output

No issues

Reporting this here since AFAIK the strict rules only enable a setting that leads to this issue.

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