NestedEntityStrategy   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A extract() 0 4 1
A hydrate() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Doctrine\Hydrator\Strategy;
5
6
use Zend\Hydrator\ExtractionInterface;
7
use Zend\Hydrator\Strategy\StrategyInterface;
8
9
final class NestedEntityStrategy implements StrategyInterface
10
{
11
    /**
12
     * @var ExtractionInterface
13
     */
14
    private $extraction;
15
16 88
    public function __construct(ExtractionInterface $extraction)
17
    {
18 88
        $this->extraction = $extraction;
19 88
    }
20
21
    /**
22
     * @inheritdoc
23
     */
24 58
    public function extract($value)
25
    {
26 58
        return $this->extraction->extract($value);
27
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32 18
    public function hydrate($value)
33
    {
34 18
        return $value;
35
    }
36
}
37