Skip to content

Commit

Permalink
[CodeQuality] Remove reprint Class_ node on ConstructorManipulator
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 19, 2024
1 parent 00ef1cd commit 58c419b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/NodeManipulator/ConstructorManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}
}
}

0 comments on commit 58c419b

Please sign in to comment.