AbstractContainerAdapter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAdaptedContainer() 0 3 1
A has() 0 3 1
A get() 0 3 1
1
<?php
2
3
namespace Panamax\Adapters;
4
5
use Panamax\Contracts\ContainerAdapterInterface;
6
use Psr\Container\ContainerInterface;
7
8
abstract class AbstractContainerAdapter implements ContainerAdapterInterface
9
{
10
    protected ContainerInterface $container;
11
12 3
    public function get(string $id)
13
    {
14 3
        return $this->container->get($id);
15
    }
16
17
    public function has(string $id): bool
18
    {
19
        return $this->container->has($id);
20
    }
21
22
    public function getAdaptedContainer(): ContainerInterface
23
    {
24
        return $this->container;
25
    }
26
}
27