Skip to content

Commit

Permalink
Allow header override
Browse files Browse the repository at this point in the history
  • Loading branch information
fab2s committed Nov 16, 2022
1 parent edba216 commit e61a56b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extractors/File/CsvExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ protected function readHeader(): ?array
return null;
}

if ($this->useHeader && !isset($this->header)) {
$this->header = array_map('trim', $firstRecord);
if ($this->useHeader) {
$this->header = $this->header ?? array_map('trim', $firstRecord);

return $this->getNextNonEmptyRecord();
}
Expand Down

0 comments on commit e61a56b

Please sign in to comment.