Skip to content

class.nameCase error is not reported when the wrong case is just in return type #11470

@JanTvrdik

Description

@JanTvrdik

Bug report

class.nameCase error is not reported when the correct case is used in use statement and wrong case is used in return type

Code snippet that reproduces the problem

https://phpstan.org/r/13cacbc4-8d7a-4e8f-8f0f-79afa8aa55af

Expected output

Class DateTimeImmutable referenced with incorrect case: dateTimeImmutable.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions