Completed
Pull Request — master (#2)
by Tomasz
03:57 queued 02:01
created

FakeNormalizerContext   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A withParent() 0 7 1
A getParent() 0 4 1
A getLevel() 0 4 1
1
<?php
2
namespace Thunder\Serializard\Tests\Fake\Context;
3
4
use Thunder\Serializard\NormalizerContext\NormalizerContextInterface;
5
6
final class FakeNormalizerContext implements NormalizerContextInterface
7
{
8
    private $parent;
9
    /** @var int */
10
    private $level = 0;
11
12
    public function __construct()
13
    {
14
    }
15
16
    public function withParent($parent)
17
    {
18
        $this->parent = $parent;
19
        $this->level++;
20
21
        return $this;
22
    }
23
24
    public function getParent()
25
    {
26
        return $this->parent;
27
    }
28
29
    public function getLevel()
30
    {
31
        return $this->level;
32
    }
33
}
34