From fa3611f7bf7f7d343c773fc0e97b6f90c27991ab Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Sat, 22 Mar 2025 10:32:17 +0100 Subject: [PATCH] Remove count() narrowing handling of empty array Is already covered by the adaption of https://github.com/phpstan/phpstan-src/pull/3895 --- src/Analyser/TypeSpecifier.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Analyser/TypeSpecifier.php b/src/Analyser/TypeSpecifier.php index 33d3c34a7e..485d8277cf 100644 --- a/src/Analyser/TypeSpecifier.php +++ b/src/Analyser/TypeSpecifier.php @@ -1067,7 +1067,6 @@ private function specifyTypesForCountFuncCall( if ( !$isNormalCount->yes() || (!$isConstantArray->yes() && !$isList->yes()) - || $type->isIterableAtLeastOnce()->no() // array{} cannot be used for further narrowing || !$oneOrMore->isSuperTypeOf($sizeType)->yes() ) { return null;