@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | // The outer iterator is a finite replaceable iterator with a condition |
| 44 | 44 | // on the inner iterator not being empty. |
| 45 | - parent::__construct(new InfiniteIterator(new ReplaceableIterator(), function ($iterator) { |
|
| 45 | + parent::__construct(new InfiniteIterator(new ReplaceableIterator(), function($iterator) { |
|
| 46 | 46 | return $iterator->current()->valid(); |
| 47 | 47 | })); |
| 48 | 48 | } |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | if (!($this->flags & self::CACHE_COUNT) || !isset($this->count)) { |
| 21 | 21 | if ($this->getInnerIterator() instanceof \Countable) { |
| 22 | 22 | $this->count = intval($this->getInnerIterator()->count()); |
| 23 | - } |
|
| 24 | - else { |
|
| 23 | + } else { |
|
| 25 | 24 | $this->count = 0; |
| 26 | 25 | $this->rewind(); |
| 27 | 26 | while ($this->valid()) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | public function splitCsvFile(\Iterator $input, callable $callback) |
| 104 | 104 | { |
| 105 | 105 | $callback = \Closure::fromCallable($callback); |
| 106 | - $this->process($input, function ($row, $rowNum, $input, $output) use ($callback) { |
|
| 106 | + $this->process($input, function($row, $rowNum, $input, $output) use ($callback) { |
|
| 107 | 107 | if ($fileName = $callback($row)) { |
| 108 | 108 | if (!$output->isFileOpen($fileName)) { |
| 109 | 109 | $output->openFile($fileName)->fputcsv(array_keys($row)); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | $callback = \Closure::fromCallable($callback); |
| 128 | 128 | $input->rewind(); |
| 129 | - iterator_apply($input, function (\Iterator $iterator) use ($callback) { |
|
| 129 | + iterator_apply($input, function(\Iterator $iterator) use ($callback) { |
|
| 130 | 130 | $callback($iterator->current(), $iterator->key(), $iterator, $this); |
| 131 | 131 | return true; |
| 132 | 132 | }, [$input]); |