Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageTokenType PHP Method

createForInvalidExpressionLanguageTokenType() public static method

public static createForInvalidExpressionLanguageTokenType ( string $type ) : InvalidArgumentException
$type string
return InvalidArgumentException
    public static function createForInvalidExpressionLanguageTokenType(string $type) : \InvalidArgumentException
    {
        return new \InvalidArgumentException(sprintf('Expected type to be a known token type but got "%s".', $type));
    }

Usage Example

Esempio n. 1
0
 public function __construct(string $type)
 {
     if (false === array_key_exists($type, self::$values)) {
         throw InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageTokenType($type);
     }
     $this->value = $type;
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageTokenType