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

NestedEntityStrategy::hydrate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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
class NestedEntityStrategy implements StrategyInterface
10
{
11
    /**
12
     * @var ExtractionInterface
13
     */
14
    private $extraction;
15
16 16
    public function __construct(ExtractionInterface $extraction)
17
    {
18 16
        $this->extraction = $extraction;
19 16
    }
20
21
    /**
22
     * @inheritdoc
23
     */
24 13
    public function extract($value)
25
    {
26 13
        return $this->extraction->extract($value);
27
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32
    public function hydrate($value)
33
    {
34
        return $value;
35
    }
36
}
37