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 9930790 commit d57c50dCopy full SHA for d57c50d
src/Rules/Comparison/ImpossibleCheckTypeHelper.php
@@ -153,11 +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) {
157
- continue;
158
- }
159
-
160
- if ($haystackArrayType->isOptionalKey($i)) {
+ if ($haystackArrayValueType instanceof UnionType || $haystackArrayType->isOptionalKey($i)) {
161
continue;
162
}
163
0 commit comments