From 58c419b18438b259a9c9fb076746a57592a8ffd4 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 19 Dec 2024 16:02:29 +0700 Subject: [PATCH] [CodeQuality] Remove reprint Class_ node on ConstructorManipulator --- src/NodeManipulator/ConstructorManipulator.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/NodeManipulator/ConstructorManipulator.php b/src/NodeManipulator/ConstructorManipulator.php index b9843b46..e072976d 100644 --- a/src/NodeManipulator/ConstructorManipulator.php +++ b/src/NodeManipulator/ConstructorManipulator.php @@ -8,7 +8,6 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use Rector\NodeManipulator\ClassInsertManipulator; -use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\NodeFactory; use Rector\ValueObject\MethodName; @@ -29,8 +28,6 @@ public function addStmtToConstructor(Class_ $class, Expression $newExpression): $constructClassMethod = $this->nodeFactory->createPublicMethod(MethodName::CONSTRUCT); $constructClassMethod->stmts[] = $newExpression; $this->classInsertManipulator->addAsFirstMethod($class, $constructClassMethod); - - $class->setAttribute(AttributeKey::ORIGINAL_NODE, null); } } }