Skip to content

Commit 30d48f3

Browse files
committed
final touch: clean up loop
1 parent 00c1bea commit 30d48f3

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

rules/Php85/Rector/ShellExec/ShellExecFunctionCallOverBackticksRector.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,9 @@ public function refactor(Node $node): ?Node
6969
}
7070

7171
// reduce to single concatenated expression
72-
if (count($exprs) === 1) {
73-
$argExpr = $exprs[0];
74-
} else {
75-
$argExpr = array_shift($exprs);
76-
foreach ($exprs as $expr) {
77-
$argExpr = new Concat($argExpr, $expr);
78-
}
72+
$argExpr = array_shift($exprs);
73+
foreach ($exprs as $expr) {
74+
$argExpr = new Concat($argExpr, $expr);
7975
}
8076

8177
// create single Arg and call shell_exec

0 commit comments

Comments
 (0)