mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
namespace rector fix
This commit is contained in:
parent
9898daa4b6
commit
81a0f1e3a0
@ -185,11 +185,10 @@ final class NamespaceReplacerRector extends AbstractRector
|
||||
{
|
||||
/** @var FullyQualified $resolvedName */
|
||||
$resolvedName = $nameNode->getAttribute(Attribute::RESOLVED_NAME);
|
||||
$fullyQualifiedName = $resolvedName->toString();
|
||||
$completeNewName = $this->resolveNewNameFromNode($resolvedName);
|
||||
|
||||
// first dummy implementation - improve
|
||||
$cutOffFromTheLeft = strlen($fullyQualifiedName) - strlen($nameNode->toString());
|
||||
$cutOffFromTheLeft = strlen($completeNewName) - strlen($nameNode->toString());
|
||||
|
||||
return substr($completeNewName, $cutOffFromTheLeft);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user