ExcelImporter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 28
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadOptions() 0 6 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