original_string: protected function record_attempt(){
      $this->cfg['num_attempts'] = isset($this->cfg['num_attempts']) ?
        $this->cfg['num_attempts']+1 : 1;
      $this->_set_session('num_attempts', $this->cfg['num_attempts']);
      $this->save_session();
      return $this;
    }
code: protected function record_attempt(){
      $this->cfg['num_attempts'] = isset($this->cfg['num_attempts']) ?
        $this->cfg['num_attempts']+1 : 1;
      $this->_set_session('num_attempts', $this->cfg['num_attempts']);
      $this->save_session();
      return $this;
    }
code_tokens: protected function record_attempt ( ) { $ this -> cfg [ 'num_attempts' ] = isset ( $ this -> cfg [ 'num_attempts' ] ) ? $ this -> cfg [ 'num_attempts' ] + 1 : 1 ; $ this -> _set_session ( 'num_attempts' , $ this -> cfg [ 'num_attempts' ] ) ; $ this -> save_session ( ) ; return $ this ; }
docstring: Increment the num_attempt variable
  @return $this
docstring_tokens: Increment the num_attempt variable