mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 04:03:55 +01:00
OptionNameRector: fix bug
This commit is contained in:
parent
70f241946f
commit
d1d3922849
@ -55,8 +55,11 @@ final class OptionNameRector extends AbstractRector
|
||||
$arrayParentNode = $arrayItemParentNode->getAttribute(Attribute::PARENT_NODE);
|
||||
$argParentNode = $arrayParentNode->getAttribute(Attribute::PARENT_NODE);
|
||||
|
||||
/** @var MethodCall $argParentNode */
|
||||
/** @var MethodCall|Node $argParentNode */
|
||||
$methodCallNode = $argParentNode->getAttribute(Attribute::PARENT_NODE);
|
||||
if (! $methodCallNode instanceof MethodCall) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $methodCallNode->name->toString() === 'add';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user