mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
remove origNode removal where not needed
This commit is contained in:
parent
61e648334d
commit
cf20829baf
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Rector\Builder;
|
||||
|
||||
use Nette\Utils\Arrays;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
|
@ -8,7 +8,6 @@ use PhpParser\NodeVisitorAbstract;
|
||||
use Rector\Builder\Class_\ClassPropertyCollector;
|
||||
use Rector\Builder\ConstructorMethodBuilder;
|
||||
use Rector\Builder\PropertyBuilder;
|
||||
use Rector\Node\Attribute;
|
||||
|
||||
/**
|
||||
* Adds new properties to class and to contructor.
|
||||
@ -65,9 +64,6 @@ final class PropertyToClassAdder extends NodeVisitorAbstract
|
||||
return $classNode;
|
||||
}
|
||||
|
||||
// prevents offset errors
|
||||
$classNode->setAttribute(Attribute::ORIGINAL_NODE, null);
|
||||
|
||||
foreach ($propertiesForClass as $propertyType => $propertyName) {
|
||||
$this->constructorMethodBuilder->addPropertyAssignToClass($classNode, $propertyType, $propertyName);
|
||||
$this->propertyBuilder->addPropertyToClass($classNode, $propertyType, $propertyName);
|
||||
|
@ -110,8 +110,6 @@ final class MagicMethodRector extends AbstractRector
|
||||
$this->docBlockAnalyzer->removeAnnotationFromNode($classNode, 'method', $methodName);
|
||||
}
|
||||
|
||||
$classNode->setAttribute(Attribute::ORIGINAL_NODE, null);
|
||||
|
||||
return $classNode;
|
||||
}
|
||||
|
||||
|
@ -63,8 +63,6 @@ final class NetteObjectToSmartTraitRector extends AbstractRector
|
||||
|
||||
$this->removeParentClass($classNode);
|
||||
|
||||
$classNode->setAttribute(Attribute::ORIGINAL_NODE, null);
|
||||
|
||||
return $classNode;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Rector\Rector\Dynamic;
|
||||
|
||||
use Nette\Utils\Arrays;
|
||||
use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Identifier;
|
||||
|
Loading…
x
Reference in New Issue
Block a user