Skip to content

Commit

Permalink
Fix double '\' when handling classes in the global namespace (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Oct 18, 2022
1 parent d9290d5 commit 891374a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Analysers/ReflectionAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function analyzeFqdn(string $fqdn, Analysis $analysis, array $details)
'context' => $context,
];
$normaliseClass = function (string $name): string {
return '\\' . $name;
return '\\' . ltrim($name, '\\');
};
if ($parentClass = $rc->getParentClass()) {
$definition['extends'] = $normaliseClass($parentClass->getName());
Expand Down

0 comments on commit 891374a

Please sign in to comment.