-
-
Notifications
You must be signed in to change notification settings - Fork 947
ltrim(class-string, '\\') is always a class-string #7483
Copy link
Copy link
Closed
phpstan/phpstan-src
#1597Labels
Description
Feature request
If you search for ltrim in all Doctrine packages, you'll find many calls to ltrim for normalization purposes, in particular normalizing a class-string prefixed with a backslash into one without. I think the rule expressed in the title is always true, but PHPStan does not seem to have that built-in (I must admit it's quite specific): https://phpstan.org/r/be10b00c-b052-4f86-805b-cc783dd21cd4
Did PHPStan help you today? Did it make you happy in any way?
I'm working on improving phpdoc on doctrine/orm before using Rector to migrate that to PHP8 native type declarations, and it's very reassuring to have PHPStan check my work 🙂
Reactions are currently unavailable