Skip to content

Method should return class-string<T of Template> but returns class-string<T of Template> #10771

@matijn-made

Description

@matijn-made

Bug report

In a specific case as demonstrated in the playground sample, PHPStan reports invalid return type, but in fact the "correct" one is exactly what is being returned.

Code snippet that reproduces the problem

https://phpstan.org/r/13868f07-b8a7-4a62-ba56-b5a858fbe026

Expected output

No errors from PHPStan

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

Love PHPStan for years, just one minor issue here :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions