Test Failed
Push — master ( 1f8fc2...506f14 )
by Dominik
02:22
created

NormalizationLinkMapping::getLinkNormalizer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Serialization\Mapping;
6
7
use Chubbyphp\Serialization\Normalizer\LinkNormalizerInterface;
8
9
final class NormalizationLinkMapping implements NormalizationLinkMappingInterface
10
{
11
    /**
12
     * @var string
13
     */
14
    private $name;
15
16
    /**
17
     * @var array
18
     */
19
    private $groups;
20
21
    /**
22
     * @var LinkNormalizerInterface
23
     */
24
    private $linkNormalizer;
25
26
    /**
27
     * @param string                  $name
28
     * @param array                   $groups
29
     * @param LinkNormalizerInterface $linkNormalizer
30
     */
31
    public function __construct(
32
        string $name,
33
        array $groups,
34
        LinkNormalizerInterface $linkNormalizer
35
    ) {
36
        $this->name = $name;
37
        $this->groups = $groups;
38
        $this->linkNormalizer = $linkNormalizer;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getName(): string
45
    {
46
        return $this->name;
47
    }
48
49
    /**
50
     * @return string[]
51
     */
52
    public function getGroups(): array
53
    {
54
        return $this->groups;
55
    }
56
57
    /**
58
     * @return LinkNormalizerInterface
59
     */
60
    public function getLinkNormalizer(): LinkNormalizerInterface
61
    {
62
        return $this->linkNormalizer;
63
    }
64
}
65