public static function createForInvalidExpressionLanguageTokenType(string $type) : \InvalidArgumentException { return new \InvalidArgumentException(sprintf('Expected type to be a known token type but got "%s".', $type)); }
public function __construct(string $type) { if (false === array_key_exists($type, self::$values)) { throw InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageTokenType($type); } $this->value = $type; }