Skip to content

Commit d57c50d

Browse files
committed
Simplify
1 parent 9930790 commit d57c50d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Rules/Comparison/ImpossibleCheckTypeHelper.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ public function findSpecifiedType(
153153
foreach ($haystackArrayTypes as $haystackArrayType) {
154154
if ($haystackArrayType instanceof ConstantArrayType) {
155155
foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
156-
if ($haystackArrayValueType instanceof UnionType) {
157-
continue;
158-
}
159-
160-
if ($haystackArrayType->isOptionalKey($i)) {
156+
if ($haystackArrayValueType instanceof UnionType || $haystackArrayType->isOptionalKey($i)) {
161157
continue;
162158
}
163159

0 commit comments

Comments
 (0)