Passed
Push — master ( 37f3ab...68213e )
by Mike
02:44
created

AbstractConfig::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 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 7
    public function __construct()
21
    {
22 7
        $this->config = XerviceConfig::getInstance()->getConfig();
23 7
    }
24
25
    /**
26
     * @param string $name
27
     * @param mixed $default
28
     *
29
     * @return mixed
30
     */
31 1
    public function get(string $name, $default = null)
32
    {
33 1
        return $this->config->get($name, $default);
34
    }
35
36
37
}