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

NullDecorator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 75%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getExtracted() 0 8 2
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