diff --git a/src/Rector/MethodCall/JsonCallToExplicitJsonCallRector.php b/src/Rector/MethodCall/JsonCallToExplicitJsonCallRector.php index e7f732af..90bd0882 100644 --- a/src/Rector/MethodCall/JsonCallToExplicitJsonCallRector.php +++ b/src/Rector/MethodCall/JsonCallToExplicitJsonCallRector.php @@ -7,6 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; +use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; use Rector\Core\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -67,7 +68,7 @@ private function updateCall(MethodCall $methodCall): ?MethodCall $arg = $methodCall->getArgs()[0]; $argValue = $arg->value; - if (! $argValue instanceof Node\Scalar\String_) { + if (! $argValue instanceof String_) { return null; }