Completed
Pull Request — master (#14)
by Pavel
04:42
created

TestEntity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Bankiru\Api\Doctrine\Test\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
7
class TestEntity
8
{
9
    /** @var  int */
10
    private $id;
11
    /** @var  string */
12
    private $payload;
13
    /** @var  TestReference[]|ArrayCollection */
14
    private $references;
15
    /** @var  TestReference */
16
    private $parent;
17
18
    /**
19
     * TestEntity constructor.
20
     */
21
    public function __construct()
22
    {
23
        $this->references = new ArrayCollection();
24
    }
25
26
    /**
27
     * @return TestReference
28
     */
29
    public function getParent()
30
    {
31
        return $this->parent;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function getId()
38
    {
39
        return $this->id;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getPayload()
46
    {
47
        return $this->payload;
48
    }
49
50
    /**
51
     * @return TestReference[]|ArrayCollection
52
     */
53
    public function getReferences()
54
    {
55
        return $this->references;
56
    }
57
58
    /**
59
     * @param TestReference $parent
60
     */
61
    public function setParent(TestReference $parent)
62
    {
63
        $this->parent = $parent;
64
    }
65
}
66