Passed
Push — master ( 356755...14835f )
by Gerrit
04:25
created

NullValueResolver   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A resolveValue() 0 7 1
A revertValue() 0 7 1
A assertValue() 0 7 1
1
<?php
2
/**
3
 * Copyright (C) 2018 Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 *
8
 * @license GPL-3.0
9
 *
10
 * @author Gerrit Addiks <[email protected]>
11
 */
12
13
namespace Addiks\RDMBundle\ValueResolver;
14
15
use Addiks\RDMBundle\ValueResolver\ValueResolverInterface;
16
use Addiks\RDMBundle\Mapping\MappingInterface;
17
use Addiks\RDMBundle\Mapping\nullMappingInterface;
18
use Addiks\RDMBundle\Exception\FailedRDMAssertionException;
19
use Addiks\RDMBundle\Hydration\HydrationContextInterface;
20
21
final class NullValueResolver implements ValueResolverInterface
22
{
23
24 1
    public function resolveValue(
25
        MappingInterface $nullMapping,
26
        HydrationContextInterface $context,
27
        array $dataFromAdditionalColumns
28
    ) {
29 1
        return null;
30
    }
31
32 1
    public function revertValue(
33
        MappingInterface $nullMapping,
34
        HydrationContextInterface $context,
35
        $valueFromEntityField
36
    ): array {
37 1
        return array();
38
    }
39
40 1
    public function assertValue(
41
        MappingInterface $nullMapping,
42
        HydrationContextInterface $context,
43
        array $dataFromAdditionalColumns,
44
        $actualValue
45
    ): void {
46 1
    }
47
48
}
49