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

NullValueResolver::assertValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 4
crap 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