Skip to content

Commit 1591bd7

Browse files
committed
Fix
1 parent ad11843 commit 1591bd7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rules/CodeQuality/Rector/Expression/DecorateWillReturnMapWithExpectsMockRector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ public function refactor(Node $node)
108108
return null;
109109
}
110110

111+
if ($methodCall->isFirstClassCallable()) {
112+
return null;
113+
}
114+
111115
// count values in will map arg
112-
$willReturnMapArg = $methodCall->getArgs()[0];
116+
$willReturnMapArg = $methodCall->getArgs()[0] ?? null;
113117
if (! $willReturnMapArg->value instanceof Array_) {
114118
return null;
115119
}

0 commit comments

Comments
 (0)