gnu-social/vendor/doctrine/cache/lib/Doctrine/Common/Cache/InvalidCacheId.php
Diogo Peralta Cordeiro 6e031d623a [VersionBump] 2.0.0beta0
Updated composer and translations

composer install --no-dev
composer dump-autoload --optimize
git add vendor/ --force
make updatepo
2021-07-18 12:49:17 +01:00

39 lines
970 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\Common\Cache;
use InvalidArgumentException;
use function sprintf;
/**
* @deprecated Deprecated without replacement in doctrine/cache 1.11. This class will be dropped in 2.0
*/
final class InvalidCacheId extends InvalidArgumentException
{
/**
* @param mixed $id
*/
public static function exceedsMaxLength($id, int $maxLength): self
{
return new self(sprintf('Cache id "%s" exceeds maximum length %d', $id, $maxLength));
}
/**
* @param mixed $id
*/
public static function containsUnauthorizedCharacter($id, string $character): self
{
return new self(sprintf('Cache id "%s" contains unauthorized character "%s"', $id, $character));
}
/**
* @param mixed $id
*/
public static function containsControlCharacter($id): self
{
return new self(sprintf('Cache id "%s" contains at least one control character', $id));
}
}