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

FakeNormalizerContext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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