original_string: private function getFieldIndex($prevTag, $tag, $fieldIndex)
      {
          if ($prevTag == $tag or '' == $prevTag) {
              return $fieldIndex; // iteration of field index will continue
          }
          $specTag = $this->currentSpec['field']->getTag();
          if (preg_match('/'.$specTag.'/', $tag)) {
              // not same field tag, but field spec tag matches
              return $fieldIndex; // iteration of field index will continue
          }
          // not same field tag, iteration gets reset
          return $this->spec['field']->getIndexStart();
      }
code: private function getFieldIndex($prevTag, $tag, $fieldIndex)
      {
          if ($prevTag == $tag or '' == $prevTag) {
              return $fieldIndex; // iteration of field index will continue
          }
          $specTag = $this->currentSpec['field']->getTag();
          if (preg_match('/'.$specTag.'/', $tag)) {
              // not same field tag, but field spec tag matches
              return $fieldIndex; // iteration of field index will continue
          }
          // not same field tag, iteration gets reset
          return $this->spec['field']->getIndexStart();
      }
code_tokens: private function getFieldIndex ( $ prevTag , $ tag , $ fieldIndex ) { if ( $ prevTag == $ tag or '' == $ prevTag ) { return $ fieldIndex ; // iteration of field index will continue } $ specTag = $ this -> currentSpec [ 'field' ] -> getTag ( ) ; if ( preg_match ( '/' . $ specTag . '/' , $ tag ) ) { // not same field tag, but field spec tag matches return $ fieldIndex ; // iteration of field index will continue } // not same field tag, iteration gets reset return $ this -> spec [ 'field' ] -> getIndexStart ( ) ; }
docstring: Get the current field index.
  
  @param string $prevTag    The previous field tag
  @param string $tag        The current field tag
  @param int    $fieldIndex The current field index
  
  @return int $fieldIndex The current field index
docstring_tokens: Get the current field index .