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

NormalizationLinkMapping   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 56
ccs 0
cts 21
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getName() 0 4 1
A getGroups() 0 4 1
A getLinkNormalizer() 0 4 1
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