for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Roave\DoctrineSimpleCache\Exception;
class InvalidArgumentException
extends \InvalidArgumentException
implements \Psr\SimpleCache\InvalidArgumentException
{
public static function fromInvalidKeyCharacters(string $invalidKey) : self
return new self(sprintf(
'Key "%s" is in an invalid format - must not contain characters: {}()/\@:',
$invalidKey
));
}
public static function fromInvalidType($invalidKey) : self
'Key was not a valid type. Expected string, received %s',
is_object($invalidKey) ? get_class($invalidKey) : gettype($invalidKey)
public static function fromEmptyKey() : self
return new self('Requested key was an empty string.');
public static function fromNonIterableKeys($invalidKeys) : self
'Keys passed were not iterable (i.e. \Traversable or array), received: %s',
is_object($invalidKeys) ? get_class($invalidKeys) : gettype($invalidKeys)
public static function fromNonIterableValues($invalidValues) : self
'Values passed were not iterable (i.e. \Traversable or array), received: %s',
is_object($invalidValues) ? get_class($invalidValues) : gettype($invalidValues)