Completed
Push — master ( 665b5b...7e390c )
by Mike
03:12
created

AbstractConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 24
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A __construct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Core\Config;
6
7
8
use Xervice\Config\XerviceConfig;
9
10
abstract class AbstractConfig implements ConfigInterface
11
{
12
    /**
13
     * @var \Xervice\Config\Container\ConfigContainer
14
     */
15
    private $config;
16
17
    /**
18
     * AbstractConfig constructor.
19
     */
20 8
    public function __construct()
21
    {
22 8
        $this->config = XerviceConfig::getInstance()->getConfig();
23 8
    }
24
25
    /**
26
     * @param string $name
27
     * @param mixed $default
28
     *
29
     * @return mixed
30
     */
31
    public function get(string $name, $default = null)
32
    {
33
        return $this->config->get($name, $default);
34
    }
35
36
37
}