ExcelImporter::loadOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php namespace Arcanedev\LaravelExcel\Importers;
2
3
use Box\Spout\Common\Type;
4
5
/**
6
 * Class     ExcelImporter
7
 *
8
 * @package  Arcanedev\LaravelExcel\Importers
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class ExcelImporter extends AbstractImporter
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /** @var  string */
19
    protected $type = Type::XLSX;
20
21
    /** @var \Box\Spout\Reader\XLSX\Reader */
22
    protected $reader;
23
24
    /* -----------------------------------------------------------------
25
     |  Other Functions
26
     | -----------------------------------------------------------------
27
     */
28
29
    /**
30
     * Load the reader options.
31
     */
32 6
    protected function loadOptions()
33
    {
34 6
        $this->reader
35 6
             ->setShouldFormatDates($this->getOption('format-dates', false))
36 6
             ->setShouldPreserveEmptyRows($this->getOption('preserve-empty-rows', false));
37 6
    }
38
}
39