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

AbstractConfig::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
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
}