Completed
Pull Request — master (#2)
by Tomasz
01:59
created

ParentNormalizerContext   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A withParent() 0 7 1
A getParent() 0 4 1
1
<?php
2
namespace Thunder\Serializard\NormalizerContext;
3
4
final class ParentNormalizerContext implements NormalizerContextInterface
5
{
6
    private $parent;
7
8 10
    public function __construct()
9
    {
10 10
    }
11
12 9
    public function withParent($parent)
13
    {
14 9
        $context = new self();
15 9
        $context->parent = $parent;
16
17 9
        return $context;
18
    }
19
20 1
    public function getParent()
21
    {
22 1
        return $this->parent;
23
    }
24
}
25