Skip to content

Commit 262df3c

Browse files
committed
Remove seemingly unnecessary benevolent union in explode extension
1 parent c586014 commit 262df3c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
use PHPStan\Type\IntegerRangeType;
1818
use PHPStan\Type\IntegerType;
1919
use PHPStan\Type\IntersectionType;
20-
use PHPStan\Type\MixedType;
2120
use PHPStan\Type\NeverType;
2221
use PHPStan\Type\StringType;
2322
use PHPStan\Type\Type;
2423
use PHPStan\Type\TypeCombinator;
25-
use PHPStan\Type\TypeUtils;
2624
use function count;
2725

2826
final class ExplodeFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
@@ -85,10 +83,6 @@ public function getTypeFromFunctionCall(
8583
$returnType = TypeCombinator::union($returnType, new ConstantBooleanType(false));
8684
}
8785

88-
if ($delimiterType instanceof MixedType) {
89-
$returnType = TypeUtils::toBenevolentUnion($returnType);
90-
}
91-
9286
return $returnType;
9387
}
9488

0 commit comments

Comments
 (0)