diff options
Diffstat (limited to 'vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php')
-rw-r--r-- | vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php b/vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php new file mode 100644 index 0000000..2cbe82a --- /dev/null +++ b/vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php | |||
@@ -0,0 +1,24 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Exception; | ||
6 | |||
7 | use Doctrine\DBAL\Connection; | ||
8 | |||
9 | use function sprintf; | ||
10 | |||
11 | /** @psalm-immutable */ | ||
12 | final class InvalidWrapperClass extends InvalidArgumentException | ||
13 | { | ||
14 | public static function new(string $wrapperClass): self | ||
15 | { | ||
16 | return new self( | ||
17 | sprintf( | ||
18 | 'The given wrapper class %s has to be a subtype of %s.', | ||
19 | $wrapperClass, | ||
20 | Connection::class, | ||
21 | ), | ||
22 | ); | ||
23 | } | ||
24 | } | ||