summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php')
-rw-r--r--vendor/doctrine/dbal/src/Exception/InvalidWrapperClass.php24
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
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Exception;
6
7use Doctrine\DBAL\Connection;
8
9use function sprintf;
10
11/** @psalm-immutable */
12final 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}