Skip to content

Commit 5f6af32

Browse files
committed
Simplify
1 parent 63cc1b7 commit 5f6af32

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
@@ -148,11 +148,7 @@ public function findSpecifiedType(
148148
foreach ($haystackArrayTypes as $haystackArrayType) {
149149
if ($haystackArrayType instanceof ConstantArrayType) {
150150
foreach ($haystackArrayType->getValueTypes() as $i => $haystackArrayValueType) {
151-
if ($haystackArrayValueType instanceof UnionType) {
152-
continue;
153-
}
154-
155-
if ($haystackArrayType->isOptionalKey($i)) {
151+
if ($haystackArrayValueType instanceof UnionType || $haystackArrayType->isOptionalKey($i)) {
156152
continue;
157153
}
158154

0 commit comments

Comments
 (0)