Completed
Push — master ( 298ac7...0024da )
by Oleg
12:58
created

DbConfigExtractionFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Db\Factory;
5
6
use Psr\Container\ContainerInterface;
7
use SlayerBirden\DataFlowServer\Doctrine\Hydrator\Strategy\NestedEntityStrategy;
8
use Zend\Hydrator\ClassMethods;
9
use Zend\Hydrator\ExtractionInterface;
10
11
class DbConfigExtractionFactory
12
{
13 12
    public function __invoke(ContainerInterface $container): ExtractionInterface
14
    {
15 12
        $extraction = new ClassMethods();
16 12
        $extraction->addStrategy('owner', new NestedEntityStrategy(new ClassMethods()));
17
18 12
        return $extraction;
19
    }
20
}
21