AssociatedEntityToWarm::getEntityId()   A
last analyzed

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
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Victoire\Bundle\WidgetMapBundle\Warmer;
4
5
class AssociatedEntityToWarm
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
6
{
7
    const TYPE_MANY_TO_ONE = 'many_to_one';
8
    const TYPE_ONE_TO_MANY = 'one_to_many';
9
10
    protected $type;
11
    protected $inheritorEntity;
12
    protected $inheritorPropertyName;
13
    protected $entityId;
14
    protected $mappedBy;
15
16
    /**
17
     * Constructor.
18
     *
19
     * @param null $type
20
     * @param null $inheritorEntity
21
     * @param null $inheritorPropertyName
22
     * @param null $entityId
23
     * @param null $mappedBy              for OneToMany type only
24
     */
25
    public function __construct(
26
        $type = null,
27
        $inheritorEntity = null,
28
        $inheritorPropertyName = null,
29
        $entityId = null,
30
        $mappedBy = null)
0 ignored issues
show
Coding Style introduced by
The closing parenthesis of a multi-line function declaration must be on a new line
Loading history...
31
    {
0 ignored issues
show
Coding Style introduced by
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Loading history...
32
        $this->type = $type;
33
        $this->inheritorEntity = $inheritorEntity;
34
        $this->inheritorPropertyName = $inheritorPropertyName;
35
        $this->entityId = $entityId;
36
        $this->mappedBy = $mappedBy;
37
    }
38
39
    public function getType()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
40
    {
41
        return $this->type;
42
    }
43
44
    /**
45
     * @param null $type
46
     *
47
     * @return $this
48
     */
49
    public function setType($type)
50
    {
51
        $this->type = $type;
52
53
        return $this;
54
    }
55
56
    /**
57
     * @return mixed
58
     */
59
    public function getInheritorEntity()
60
    {
61
        return $this->inheritorEntity;
62
    }
63
64
    /**
65
     * @param mixed $inheritorEntity
66
     *
67
     * @return $this
68
     */
69
    public function setInheritorEntity($inheritorEntity)
70
    {
71
        $this->inheritorEntity = $inheritorEntity;
72
73
        return $this;
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79
    public function getInheritorPropertyName()
80
    {
81
        return $this->inheritorPropertyName;
82
    }
83
84
    /**
85
     * @param mixed $inheritorPropertyName
86
     *
87
     * @return $this
88
     */
89
    public function setInheritorPropertyName($inheritorPropertyName)
90
    {
91
        $this->inheritorPropertyName = $inheritorPropertyName;
92
93
        return $this;
94
    }
95
96
    /**
97
     * Get entity id for ManyToOne type.
98
     *
99
     * @return int
100
     */
101
    public function getEntityId()
102
    {
103
        return $this->entityId;
104
    }
105
106
    /**
107
     * @param mixed $entityId
108
     *
109
     * @return $this
110
     */
111
    public function setEntityId($entityId)
112
    {
113
        $this->entityId = $entityId;
114
115
        return $this;
116
    }
117
118
    public function getMappedBy()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
119
    {
120
        return $this->mappedBy;
121
    }
122
123
    /**
124
     * @param null $mappedBy
125
     *
126
     * @return $this
127
     */
128
    public function setMappedBy($mappedBy)
129
    {
130
        $this->mappedBy = $mappedBy;
131
132
        return $this;
133
    }
134
}
135