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 57ed25e commit d637273Copy full SHA for d637273
src/Rules/Comparison/ImpossibleCheckTypeHelper.php
@@ -154,7 +154,7 @@ public function findSpecifiedType(
154
foreach ($haystackArrayTypes as $haystackArrayType) {
155
if ($haystackArrayType instanceof ConstantArrayType) {
156
foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
157
- if (count($haystackArrayValueType->getFiniteTypes()) > 1 || $haystackArrayType->isOptionalKey($i)) {
+ if ($haystackArrayType->isOptionalKey($i)) {
158
continue;
159
}
160
0 commit comments