protected function getRowIndex($xmlReader) { // Get "r" attribute if present (from something like <row r="3"...> $currentRowIndex = $xmlReader->getAttribute(self::XML_ATTRIBUTE_ROW_INDEX); return $currentRowIndex !== null ? intval($currentRowIndex) : $this->lastRowIndexProcessed + 1; }