summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Exception/NoKeyValue.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/doctrine/dbal/src/Exception/NoKeyValue.php')
-rw-r--r--vendor/doctrine/dbal/src/Exception/NoKeyValue.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Exception/NoKeyValue.php b/vendor/doctrine/dbal/src/Exception/NoKeyValue.php
new file mode 100644
index 0000000..5cea11d
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Exception/NoKeyValue.php
@@ -0,0 +1,27 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Exception;
6
7use Doctrine\DBAL\Exception;
8
9use function sprintf;
10
11/**
12 * @internal
13 *
14 * @psalm-immutable
15 */
16final class NoKeyValue extends \Exception implements Exception
17{
18 public static function fromColumnCount(int $columnCount): self
19 {
20 return new self(
21 sprintf(
22 'Fetching as key-value pairs requires the result to contain at least 2 columns, %d given.',
23 $columnCount,
24 ),
25 );
26 }
27}