Skip to content

Commit caf2e2a

Browse files
committed
Update AssertSameWithCountRule.php
1 parent bda4b02 commit caf2e2a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/Rules/PHPUnit/AssertSameWithCountRule.php‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@ private static function rewriteArgs(array $args, Scope $scope): ?array
161161

162162
$callLike = $arg->value;
163163

164-
// The count call itself must not use named arguments or unpacking.
165-
foreach ($callLike->getArgs() as $callArg) {
166-
if ($callArg->name !== null || $callArg->unpack) {
167-
return null;
168-
}
164+
// for now skip more complex cases
165+
if (AssertRuleHelper::hasNamedOrUnpackedArguments($callLike)) {
166+
return null;
169167
}
170168

171169
if (self::isCountFunctionCall($callLike, $scope)) {

0 commit comments

Comments
 (0)