Translated using Weblate (Portuguese)
[phpmyadmin.git] / src / Identifiers / InvalidTableName.php
blobf6be232353d1573f8f0dd539092e06a301efce90
1 <?php
3 declare(strict_types=1);
5 namespace PhpMyAdmin\Identifiers;
7 use function __;
8 use function sprintf;
10 class InvalidTableName extends InvalidIdentifier
12 public static function fromEmptyName(): self
14 return new self(__('The table 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 table name cannot be longer than %d characters.'), $length));
23 public static function fromNameWithTrailingSpace(): self
25 return new self(__('The table name cannot end with a space character.'));