Skip to content

@phpstan-assert not considered a side effect #12224

@jack-worman

Description

@jack-worman

Bug report

Asserts should be considered "side-effects", so that the function call is not reported as useless.

Code snippet that reproduces the problem

https://phpstan.org/r/c939e186-d87d-4efd-baf5-351f8442e985

Expected output

There should be no error reported.

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

❤️❤️❤️

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