public function consume($handle) { while (false !== ($row = fgetcsv($handle, 0, $this->delimiter))) { if (false === is_null($this->transformer)) { (yield $this->transformer->apply($row)); } else { (yield $row); } } }
public function consume($handle) { while (false !== ($line = fgets($handle))) { if (false === is_null($this->transformer)) { (yield $this->transformer->apply($line)); } else { (yield $line); } } }