initialize($weldLogData, $document, $sheet, $currentRow, $settings); $this->log("Processing generic document: {$document['type']}"); $lineIdentifier = $weldLogData[$this->registerColumnBased]; $normalized = $this->normalizeSearchTerm($lineIdentifier); $search = $this->searchFiles("storage/documents/{$document['path']}/*{$normalized}*.pdf"); $placeholderReplacer = new \App\Services\RegisterCreator\PlaceholderReplacer(); $documentDate = $placeholderReplacer->getLatestDate($weldLogData, $this->registerColumnBased); $newRow = $this->addRowToExcel( $search, $lineIdentifier, $documentDate ); if ($newRow > $currentRow) { $currentRow = $newRow; } return $currentRow; } }