Completed
Push — develop_3.0 ( 4d6437...b7e467 )
by Adrien
02:48
created

OptionsManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 24
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSupportedOptions() 0 8 1
A setDefaultOptions() 0 6 1
1
<?php
2
3
namespace Box\Spout\Reader\XLSX\Manager;
4
5
use Box\Spout\Common\Manager\OptionsManagerAbstract;
6
use Box\Spout\Reader\Common\Entity\Options;
7
8
/**
9
 * Class OptionsManager
10
 * XLSX Reader options manager
11
 *
12
 * @package Box\Spout\Reader\XLSX\Manager
13
 */
14
class OptionsManager extends OptionsManagerAbstract
15
{
16
    /**
17
     * @inheritdoc
18
     */
19 39
    protected function getSupportedOptions()
20
    {
21
        return [
22 39
            Options::TEMP_FOLDER,
23
            Options::SHOULD_FORMAT_DATES,
24
            Options::SHOULD_PRESERVE_EMPTY_ROWS,
25
        ];
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31 39
    protected function setDefaultOptions()
32
    {
33 39
        $this->setOption(Options::TEMP_FOLDER, sys_get_temp_dir());
34 39
        $this->setOption(Options::SHOULD_FORMAT_DATES, false);
35 39
        $this->setOption(Options::SHOULD_PRESERVE_EMPTY_ROWS, false);
36 39
    }
37
}
38