We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 057c471 commit 8590a1eCopy full SHA for 8590a1e
src/Type/UnionType.php
@@ -6,6 +6,7 @@
6
use DateTimeImmutable;
7
use DateTimeInterface;
8
use Error;
9
+use Exception;
10
use Iterator;
11
use IteratorAggregate;
12
use PHPStan\Php\PhpVersion;
@@ -52,7 +53,7 @@ class UnionType implements CompoundType
52
53
54
public const EQUAL_UNION_CLASSES = [
55
DateTimeInterface::class => [DateTimeImmutable::class, DateTime::class],
- Throwable::class => [Error::class, Throwable::class],
56
+ Throwable::class => [Error::class, Exception::class], // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException
57
Traversable::class => [IteratorAggregate::class, Iterator::class],
58
];
59
0 commit comments