protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null)
    {
        if (is_null($retryAfter)) {
            return $this->limiter->retriesLeft($key, $maxAttempts);
        }

        return 0;
    }
protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null)
    {
        if (is_null($retryAfter)) {
            return $this->limiter->retriesLeft($key, $maxAttempts);
        }

        return 0;
    }
protected function calculateRemainingAttempts ( $ key , $ maxAttempts , $ retryAfter = null ) { if ( is_null ( $ retryAfter ) ) { return $ this -> limiter -> retriesLeft ( $ key , $ maxAttempts ) ; } return 0 ; }
Calculate the number of remaining attempts.

@param  string  $key
@param  int  $maxAttempts
@param  int|null  $retryAfter
@return int
Calculate the number of remaining attempts .