TypeNotFound.php 388 Bytes
Newer Older
1 2 3 4 5 6 7
<?php

declare(strict_types=1);

namespace Doctrine\DBAL\Types\Exception;

use Doctrine\DBAL\DBALException;
Sergei Morozov's avatar
Sergei Morozov committed
8

9 10
use function sprintf;

Grégoire Paris's avatar
Grégoire Paris committed
11 12 13
/**
 * @psalm-immutable
 */
14 15
final class TypeNotFound extends DBALException implements TypesException
{
Sergei Morozov's avatar
Sergei Morozov committed
16
    public static function new(string $name): self
17
    {
18
        return new self(sprintf('Type to be overwritten "%s" does not exist.', $name));
19 20
    }
}