original_string: protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null)
      {
          if (is_null($retryAfter)) {
              return $this->limiter->retriesLeft($key, $maxAttempts);
          }
  
          return 0;
      }
code: protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null)
      {
          if (is_null($retryAfter)) {
              return $this->limiter->retriesLeft($key, $maxAttempts);
          }
  
          return 0;
      }
code_tokens: protected function calculateRemainingAttempts ( $ key , $ maxAttempts , $ retryAfter = null ) { if ( is_null ( $ retryAfter ) ) { return $ this -> limiter -> retriesLeft ( $ key , $ maxAttempts ) ; } return 0 ; }
docstring: Calculate the number of remaining attempts.
  
  @param  string  $key
  @param  int  $maxAttempts
  @param  int|null  $retryAfter
  @return int
docstring_tokens: Calculate the number of remaining attempts .