mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 20:23:49 +01:00
ExpressionAdder: run only if these are nodes to be added
This commit is contained in:
parent
f5aaf95676
commit
4128ffcbb8
@ -80,6 +80,10 @@ final class ExpressionAdder
|
||||
*/
|
||||
public function addExpressionsToNodes(array $nodes): array
|
||||
{
|
||||
if (! count($this->expressionsToAdd)) {
|
||||
return $nodes;
|
||||
}
|
||||
|
||||
$this->expressionAddingNodeVisitor->setExpressionsToAdd($this->expressionsToAdd);
|
||||
|
||||
return $this->nodeTraverser->traverse($nodes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user