@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php namespace Arcanedev\LaravelExcel\Exporters; |
2 | 2 | |
3 | -use Illuminate\Support\Collection; |
|
4 | -use Box\Spout\Writer\WriterFactory; |
|
5 | -use Arcanedev\LaravelExcel\Contracts\Serializer as SerializerContract; |
|
6 | 3 | use Arcanedev\LaravelExcel\Contracts\Exporter as ExporterContract; |
4 | +use Arcanedev\LaravelExcel\Contracts\Serializer as SerializerContract; |
|
5 | +use Box\Spout\Writer\WriterFactory; |
|
6 | +use Illuminate\Support\Collection; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Class AbstractExporter |
@@ -164,8 +164,9 @@ |
||
164 | 164 | */ |
165 | 165 | protected function makeRows() |
166 | 166 | { |
167 | - if ( ! empty($headerRow = $this->serializer->getHeader())) |
|
168 | - $this->writer->addRow($headerRow); |
|
167 | + if ( ! empty($headerRow = $this->serializer->getHeader())) { |
|
168 | + $this->writer->addRow($headerRow); |
|
169 | + } |
|
169 | 170 | |
170 | 171 | foreach ($this->data as $record) { |
171 | 172 | $this->writer->addRow( |
@@ -197,7 +197,9 @@ |
||
197 | 197 | $rows = Collection::make(); |
198 | 198 | |
199 | 199 | foreach ($this->reader->getSheetIterator() as $index => $sheet) { |
200 | - if ($index !== $this->sheet) continue; |
|
200 | + if ($index !== $this->sheet) { |
|
201 | + continue; |
|
202 | + } |
|
201 | 203 | |
202 | 204 | foreach ($sheet->getRowIterator() as $row) { |
203 | 205 | $rows->push($this->parser->transform($row)); |