Skip to content

"PHPDoc tag @var for variable $x contains unknown class a" - after class_exists(a::class) #9055

@staabm

Description

@staabm

Feature request

I think there shouldn't be a

PHPDoc tag @var for variable $x contains unknown class a

error, as I checked for class-existance beforehand

https://phpstan.org/r/3484502c-1cb0-44b2-9ce6-8b7180d14f04

I have code like this in situtations when the class in question is defined by a vendor lib and this lib is a optional dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions