Skip to content

Enums functions are reported as possibly impure #13201

Closed
phpstan/phpstan-src
#4079
@grizzm0

Description

@grizzm0

Bug report

Enum functions does not cause any side effects and should be considered as pure.

They are already marked as not having any side effects in resources/functionMetadata.php

Code snippet that reproduces the problem

https://phpstan.org/r/be03c0d3-80cf-458b-b8c4-f96e74100e46

Expected output

I'd expect no error here.

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

Welcome to the family. :)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions