Code Duplication    Length = 5-10 lines in 2 locations

src/Psalm/Internal/Type/TypeCombination.php 2 locations

@@ 235-244 (lines=10) @@
232
233
                return $union_type;
234
            }
235
        } elseif (isset($combination->value_types['void'])) {
236
            unset($combination->value_types['void']);
237
238
            // if we're merging with another type, we cannot represent it in PHP
239
            $from_docblock = true;
240
241
            if (!isset($combination->value_types['null'])) {
242
                $combination->value_types['null'] = new TNull();
243
            }
244
        }
245
246
        if (isset($combination->value_types['true']) && isset($combination->value_types['false'])) {
247
            unset($combination->value_types['true'], $combination->value_types['false']);
@@ 246-250 (lines=5) @@
243
            }
244
        }
245
246
        if (isset($combination->value_types['true']) && isset($combination->value_types['false'])) {
247
            unset($combination->value_types['true'], $combination->value_types['false']);
248
249
            $combination->value_types['bool'] = new TBool();
250
        }
251
252
        if ($combination->array_type_params
253
            && (isset($combination->named_object_types['Traversable'])