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

TestEntity   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 2 Features 0
Metric Value
c 3
b 2
f 0
dl 0
loc 51
wmc 5
lcom 0
cbo 1
ccs 11
cts 11
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getParent() 0 4 1
A getId() 0 4 1
A getPayload() 0 4 1
A getReferences() 0 4 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