@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | private function registerExporter() |
39 | 39 | { |
40 | - $this->singleton('arcanedev.excel.exporter', function ($app) { |
|
40 | + $this->singleton('arcanedev.excel.exporter', function($app) { |
|
41 | 41 | return new ExporterFactory($app); |
42 | 42 | }); |
43 | 43 | $this->bind(Contracts\ExporterManager::class, 'arcanedev.excel.exporter'); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | private function registerImporter() |
47 | 47 | { |
48 | - $this->singleton('arcanedev.excel.importer', function ($app) { |
|
48 | + $this->singleton('arcanedev.excel.importer', function($app) { |
|
49 | 49 | return new ImporterFactory($app); |
50 | 50 | }); |
51 | 51 | $this->bind(Contracts\ImporterManager::class, 'arcanedev.excel.importer'); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | | ------------------------------------------------------------------------------------------------ |
19 | 19 | */ |
20 | 20 | /** @var array */ |
21 | - protected $data = []; |
|
21 | + protected $data = [ ]; |
|
22 | 22 | |
23 | 23 | /** @var string */ |
24 | 24 | protected $type; |
@@ -123,8 +123,9 @@ |
||
123 | 123 | */ |
124 | 124 | protected function makeRows(&$writer) |
125 | 125 | { |
126 | - if ( ! empty($headerRow = $this->serializer->getHeader())) |
|
127 | - $writer->addRow($headerRow); |
|
126 | + if ( ! empty($headerRow = $this->serializer->getHeader())) { |
|
127 | + $writer->addRow($headerRow); |
|
128 | + } |
|
128 | 129 | |
129 | 130 | foreach ($this->data as $record) { |
130 | 131 | $writer->addRow( |
@@ -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 |
@@ -33,6 +33,6 @@ |
||
33 | 33 | */ |
34 | 34 | public function getHeader() |
35 | 35 | { |
36 | - return []; |
|
36 | + return [ ]; |
|
37 | 37 | } |
38 | 38 | } |
@@ -156,7 +156,9 @@ |
||
156 | 156 | $collection = Collection::make(); |
157 | 157 | |
158 | 158 | foreach ($reader->getSheetIterator() as $index => $sheet) { |
159 | - if ($index !== $this->sheet) continue; |
|
159 | + if ($index !== $this->sheet) { |
|
160 | + continue; |
|
161 | + } |
|
160 | 162 | |
161 | 163 | foreach ($sheet->getRowIterator() as $row) { |
162 | 164 | $collection->push( |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function getDefaultDriver() |
24 | 24 | { |
25 | - return $this->app['config']['laravel-excel.default']; |
|
25 | + return $this->app[ 'config' ][ 'laravel-excel.default' ]; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /* ------------------------------------------------------------------------------------------------ |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function getDefaultDriver() |
24 | 24 | { |
25 | - return $this->app['config']['laravel-excel.default']; |
|
25 | + return $this->app[ 'config' ][ 'laravel-excel.default' ]; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /* ------------------------------------------------------------------------------------------------ |