We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26193be commit 4313decCopy full SHA for 4313dec
src/Rules/Comparison/ImpossibleCheckTypeHelper.php
@@ -153,7 +153,7 @@ public function findSpecifiedType(
153
foreach ($haystackArrayTypes as $haystackArrayType) {
154
if ($haystackArrayType instanceof ConstantArrayType) {
155
foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
156
- if ($haystackArrayValueType instanceof UnionType || $haystackArrayType->isOptionalKey($i)) {
+ if (count($haystackArrayValueType->getFiniteTypes()) > 1 || $haystackArrayType->isOptionalKey($i)) {
157
continue;
158
}
159
0 commit comments