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