mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Strip out leading slashes before reflecting
This commit is contained in:
parent
ecf9d8afd7
commit
ea62387cae
@ -127,6 +127,7 @@ class ClassLikes
|
||||
$predefined_classes = get_declared_classes();
|
||||
|
||||
foreach ($predefined_classes as $predefined_class) {
|
||||
$predefined_class = preg_replace('/^\\/', $predefined_class);
|
||||
$reflection_class = new \ReflectionClass($predefined_class);
|
||||
|
||||
if (!$reflection_class->isUserDefined()) {
|
||||
@ -140,6 +141,7 @@ class ClassLikes
|
||||
$predefined_interfaces = get_declared_interfaces();
|
||||
|
||||
foreach ($predefined_interfaces as $predefined_interface) {
|
||||
$predefined_interface = preg_replace('/^\\/', $predefined_interface);
|
||||
$reflection_class = new \ReflectionClass($predefined_interface);
|
||||
|
||||
if (!$reflection_class->isUserDefined()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user