Completed
Push — master ( a199f7...eac768 )
by Oleg
06:42
created

NullDecorator::getExtracted()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
crap 2.0625
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Doctrine\Hydrator\Strategy\Decoration;
5
6
use Zend\Hydrator\Strategy\StrategyInterface;
7
8
final class NullDecorator implements DecoratorInterface
9
{
10 2
    public function getExtracted(StrategyInterface $strategy, $value)
11
    {
12 2
        if ($value === null) {
13 2
            return null;
14
        }
15
16
        return $strategy->extract($value);
17
    }
18
}
19