Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Exception;
4
 
5
use Doctrine\DBAL\Exception;
6
 
7
use function sprintf;
8
 
9
/**
10
 * @internal
11
 *
12
 * @psalm-immutable
13
 */
14
final class NoKeyValue extends Exception
15
{
16
    public static function fromColumnCount(int $columnCount): self
17
    {
18
        return new self(
19
            sprintf(
20
                'Fetching as key-value pairs requires the result to contain at least 2 columns, %d given.',
21
                $columnCount,
22
            ),
23
        );
24
    }
25
}