Skip to content

Commit 8590a1e

Browse files
Fix
1 parent 057c471 commit 8590a1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Type/UnionType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DateTimeImmutable;
77
use DateTimeInterface;
88
use Error;
9+
use Exception;
910
use Iterator;
1011
use IteratorAggregate;
1112
use PHPStan\Php\PhpVersion;
@@ -52,7 +53,7 @@ class UnionType implements CompoundType
5253

5354
public const EQUAL_UNION_CLASSES = [
5455
DateTimeInterface::class => [DateTimeImmutable::class, DateTime::class],
55-
Throwable::class => [Error::class, Throwable::class],
56+
Throwable::class => [Error::class, Exception::class], // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException
5657
Traversable::class => [IteratorAggregate::class, Iterator::class],
5758
];
5859

0 commit comments

Comments
 (0)