Total Complexity | 5 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class InputSettingData |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $pathToConfigFile; |
||
15 | |||
16 | /** |
||
17 | * @var bool |
||
18 | */ |
||
19 | private $fixEnabled; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $pathToCacheDir; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | private $disableCache; |
||
30 | |||
31 | /** |
||
32 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
33 | */ |
||
34 | 10 | public function __construct(InputInterface $input) |
|
35 | { |
||
36 | /** @var string $pathToConfigFile */ |
||
37 | 10 | $pathToConfigFile = $input->getArgument(YamlCommand::ARGUMENT_PATH_TO_CONFIG_FILE); |
|
38 | 10 | $this->pathToConfigFile = $pathToConfigFile; |
|
39 | 10 | $this->fixEnabled = $input->getOption(YamlCommand::OPTION_FIX); |
|
40 | 10 | $this->pathToCacheDir = $input->getOption(YamlCommand::OPTION_PATH_TO_CACHE_DIR); |
|
41 | 10 | $this->disableCache = $input->getOption(YamlCommand::OPTION_DISABLE_CACHE); |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 10 | public function getPathToConfigFile(): string |
|
48 | { |
||
49 | 10 | return $this->pathToConfigFile; |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | 7 | public function isFixEnabled(): bool |
|
56 | { |
||
57 | 7 | return $this->fixEnabled; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 10 | public function getPathToCacheDir(): string |
|
64 | { |
||
65 | 10 | return $this->pathToCacheDir; |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | 9 | public function isCacheDisabled(): bool |
|
74 | } |
||
75 | } |
||
76 |