Skip to content

Commit

Permalink
Addition of methods setHeaderOffset and setDelimiter
Browse files Browse the repository at this point in the history
In this commit we add setHeaderOffset and setDelimiter to the CsvReader.
This will enable users to make use of the LeagueReader setters to change the offset and delimiter durig CSV reading
  • Loading branch information
Maarten Kooij committed Jul 30, 2019
1 parent e33e6da commit 55163ee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Reader/CsvReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public static function createFromPath(string $path): CsvReader
return new static(LeagueReader::createFromPath($path));
}

public function setHeaderOffset(int $offset)
{
$this->reader->setHeaderOffset($offset);
}

public function setDelimiter(string $delimiter)
{
$this->reader->setDelimiter($delimiter);
}

public function fetch(): Generator
{
foreach ($this->reader as $line) {
Expand Down

0 comments on commit 55163ee

Please sign in to comment.