original_string: public function run(callable $action)
      {
          $retryCount = 0;
          $lastException = null;
  
          do {
              try {
                  return $action();
              } catch (Exception $e) {
                  $lastException = $e;
                  if (!$this->strategy->shouldRetry($e, $retryCount)) {
                      throw $e;
                  }
              }
          } while ($this->retries > $retryCount++);
  
          if ($lastException !== null) {
              throw $lastException;
          }
      }
code: public function run(callable $action)
      {
          $retryCount = 0;
          $lastException = null;
  
          do {
              try {
                  return $action();
              } catch (Exception $e) {
                  $lastException = $e;
                  if (!$this->strategy->shouldRetry($e, $retryCount)) {
                      throw $e;
                  }
              }
          } while ($this->retries > $retryCount++);
  
          if ($lastException !== null) {
              throw $lastException;
          }
      }
code_tokens: public function run ( callable $ action ) { $ retryCount = 0 ; $ lastException = null ; do { try { return $ action ( ) ; } catch ( Exception $ e ) { $ lastException = $ e ; if ( ! $ this -> strategy -> shouldRetry ( $ e , $ retryCount ) ) { throw $ e ; } } } while ( $ this -> retries > $ retryCount ++ ) ; if ( $ lastException !== null ) { throw $ lastException ; } }
docstring: The number of retries to perform in case of failure
  
  @param callable $action The callable action to execute with a retry strategy
  @return mixed The return value of the passed action callable
  @throws \Exception
docstring_tokens: The number of retries to perform in case of failure