Skip to content

Commit

Permalink
Use BenevolentUnion
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Feb 23, 2022
1 parent 0c68467 commit a45c54e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Type/Php/ThrowableReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use PHPStan\Type\TypeUtils;
use PHPStan\Type\UnionType;
use Throwable;
use function count;
use function in_array;
Expand Down Expand Up @@ -53,7 +52,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
}

if ($pdoException->isSuperTypeOf($classType)->yes()) {
$types[] = new UnionType([new IntegerType(), new StringType()]);
$types[] = new BenevolentUnionType([new IntegerType(), new StringType()]);
continue;
}

Expand Down

0 comments on commit a45c54e

Please sign in to comment.