3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Identifiers
;
10 class InvalidDatabaseName
extends InvalidIdentifier
12 public static function fromEmptyName(): self
14 return new self(__('The database name must be a non-empty string.'));
17 /** @psalm-param positive-int $length */
18 public static function fromLongName(int $length): self
20 return new self(sprintf(__('The database name cannot be longer than %d characters.'), $length));
23 public static function fromNameWithTrailingSpace(): self
25 return new self(__('The database name cannot end with a space character.'));