Total Complexity | 6 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | abstract class AbstractIO implements IOInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Stores the provider's config. |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $config = []; |
||
21 | |||
22 | /** |
||
23 | * Stores any default values for the config. |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $configDefaults = []; |
||
27 | |||
28 | /** |
||
29 | * @param array $config |
||
30 | */ |
||
31 | 25 | public function __construct($config = []) |
|
32 | { |
||
33 | 25 | $this->setConfig($config); |
|
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 25 | public function setConfig($config) |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Gets the given config key, will load from config defaults if not set or return |
||
46 | * null if there is no default. |
||
47 | * |
||
48 | * @param string|int $key |
||
49 | * |
||
50 | * @return string|array |
||
51 | */ |
||
52 | 23 | public function getConfig($key = null) |
|
71 |