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 63cc1b7 commit 5f6af32Copy full SHA for 5f6af32
src/Rules/Comparison/ImpossibleCheckTypeHelper.php
@@ -148,11 +148,7 @@ public function findSpecifiedType(
148
foreach ($haystackArrayTypes as $haystackArrayType) {
149
if ($haystackArrayType instanceof ConstantArrayType) {
150
foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
151
- if ($haystackArrayValueType instanceof UnionType) {
152
- continue;
153
- }
154
-
155
- if ($haystackArrayType->isOptionalKey($i)) {
+ if ($haystackArrayValueType instanceof UnionType || $haystackArrayType->isOptionalKey($i)) {
156
continue;
157
}
158
0 commit comments