From 262df3cb37cf03f1a5dd1e2ee29ff6ca465c77a7 Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Wed, 4 Dec 2024 15:53:54 +0100 Subject: [PATCH] Remove seemingly unnecessary benevolent union in explode extension --- src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php b/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php index d675eee45c..3455d6bc4f 100644 --- a/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php +++ b/src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php @@ -17,12 +17,10 @@ use PHPStan\Type\IntegerRangeType; use PHPStan\Type\IntegerType; use PHPStan\Type\IntersectionType; -use PHPStan\Type\MixedType; use PHPStan\Type\NeverType; use PHPStan\Type\StringType; use PHPStan\Type\Type; use PHPStan\Type\TypeCombinator; -use PHPStan\Type\TypeUtils; use function count; final class ExplodeFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension @@ -85,10 +83,6 @@ public function getTypeFromFunctionCall( $returnType = TypeCombinator::union($returnType, new ConstantBooleanType(false)); } - if ($delimiterType instanceof MixedType) { - $returnType = TypeUtils::toBenevolentUnion($returnType); - } - return $returnType; }