Skip to content

Commit ea4c1d8

Browse files
committed
[ci-review] Rector Rectify
1 parent d033f67 commit ea4c1d8

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

rules/Php86/Rector/FuncCall/MinMaxToClampRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rector\Php86\Rector\FuncCall;
66

7+
use PhpParser\Node\Identifier;
78
use PhpParser\Node;
89
use PhpParser\Node\Arg;
910
use PhpParser\Node\Expr;
@@ -129,7 +130,7 @@ private function createClampFuncCall(
129130

130131
private function isSupportedArg(Arg $arg): bool
131132
{
132-
return ! $arg->unpack && $arg->name === null;
133+
return ! $arg->unpack && !$arg->name instanceof Identifier;
133134
}
134135

135136
/**

src/Rector/AbstractRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ protected function getType(Node $node): Type
224224
/**
225225
* Use this method for getting native expr type
226226
*/
227-
protected function getNativeType(Expr $node): Type
227+
protected function getNativeType(Expr $expr): Type
228228
{
229-
return $this->nodeTypeResolver->getNativeType($node);
229+
return $this->nodeTypeResolver->getNativeType($expr);
230230
}
231231

232232
/**

0 commit comments

Comments
 (0)