public static function createInvalidTokenMaxHitsPerQuery(
        string $tokenReference,
        int $maxHitsPerQuery
    ): self {
        return new self(sprintf('Token %s not valid. Max %d hits allowed', $tokenReference, $maxHitsPerQuery));
    }
public static function createInvalidTokenMaxHitsPerQuery(
        string $tokenReference,
        int $maxHitsPerQuery
    ): self {
        return new self(sprintf('Token %s not valid. Max %d hits allowed', $tokenReference, $maxHitsPerQuery));
    }
public static function createInvalidTokenMaxHitsPerQuery ( string $ tokenReference , int $ maxHitsPerQuery ) : self { return new self ( sprintf ( 'Token %s not valid. Max %d hits allowed' , $ tokenReference , $ maxHitsPerQuery ) ) ; }
Throw an invalid key exception.

@param string $tokenReference
@param int    $maxHitsPerQuery

@return InvalidTokenException
Throw an invalid key exception .