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

DbConfigExtractionFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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