Completed
Pull Request — master (#8)
by Pavel
05:07
created

TestEntity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Bankiru\Api\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 9
    public function __construct()
22
    {
23 9
        $this->references = new ArrayCollection();
24 9
    }
25
26
    /**
27
     * @return TestReference
28
     */
29 2
    public function getParent()
30
    {
31 2
        return $this->parent;
32
    }
33
34
    /**
35
     * @return int
36
     */
37 9
    public function getId()
38
    {
39 9
        return $this->id;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 9
    public function getPayload()
46
    {
47 9
        return $this->payload;
48
    }
49
50
    /**
51
     * @return TestReference[]|ArrayCollection
52
     */
53 2
    public function getReferences()
54
    {
55 2
        return $this->references;
56
    }
57
}
58