Completed
Push — master ( 0024da...3d898f )
by Oleg
03:17
created

ObscuredStrategy::hydrate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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
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\Strategy\StrategyInterface;
7
8
class ObscuredStrategy implements StrategyInterface
9
{
10
    /**
11
     * @inheritdoc
12
     */
13 9
    public function extract($value)
14
    {
15 9
        if ($value !== null) {
16 1
            return '*****';
17
        }
18
19 8
        return $value;
20
    }
21
22
    /**
23
     * @inheritdoc
24
     */
25
    public function hydrate($value)
26
    {
27
        return $value;
28
    }
29
}
30