mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 13:25:30 +01:00
Fix EncapsedStringsToSprintfRector for non-var exprs
This commit is contained in:
parent
cdc8696819
commit
b1d031031b
@ -4,8 +4,8 @@ namespace Rector\CodingStyle\Rector\Encapsed;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Scalar\Encapsed;
|
||||
use PhpParser\Node\Scalar\EncapsedStringPart;
|
||||
@ -68,7 +68,7 @@ PHP
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($part instanceof Variable) {
|
||||
if ($part instanceof Expr) {
|
||||
$string .= '%s';
|
||||
$arguments[] = new Arg($part);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user