analyse/types/invalid-cast
In the analyse-essential preset and every stricter one. Report only.
Configuration
[analyse.rules]
"types/invalid-cast" = "on"
To skip it in some files or lines, add an ignore comment.
Replaces
InvalidCastRule(phpstan-classes)InvalidTypeCast(mago-analyzer)cast.bool(phpstan)cast.double(phpstan)cast.int(phpstan)cast.string(phpstan)