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

PrefixedEntity::__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
use Doctrine\Common\Collections\Collection;
7
8
class PrefixedEntity
9
{
10
    /** @var string */
11
    private $id;
12
13
    /** @var string */
14
    private $payload;
15
16
    /** @var PrefixedEntity */
17
    private $parent;
18
19
    /** @var PrefixedEntity[]|Collection */
20
    private $children;
21
22
    /**
23
     * PrefixedEntity constructor.
24
     */
25
    public function __construct()
26
    {
27
        $this->children = new ArrayCollection();
28
    }
29
30
31
    /**
32
     * @return mixed
33
     */
34
    public function getId()
35
    {
36
        return $this->id;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getPayload()
43
    {
44
        return $this->payload;
45
    }
46
47
    /**
48
     * @return PrefixedEntity
49
     */
50
    public function getParent()
51
    {
52
        return $this->parent;
53
    }
54
55
    /**
56
     * @return PrefixedEntity[]
57
     */
58
    public function getChildren()
59
    {
60
        return $this->children;
61
    }
62
}
63