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