Completed
Push — master ( 1f8f60...98572a )
by Koldo
02:48
created

ContainerConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A has() 0 3 1
A get() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Container;
6
7
class ContainerConfig
8
{
9
    private $config;
10
11 13
    public function __construct(array $config)
12
    {
13 13
        $this->config = $config;
14 13
    }
15
16 11
    public function get(string $id)
17
    {
18 11
        return $this->config[$id];
19
    }
20
21 10
    public function has($id): bool
22
    {
23 10
        return array_key_exists($id, $this->config);
24
    }
25
}
26