Completed
Pull Request — development (#495)
by Mirco
08:08
created

PageBlock::setPageGroupId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 6
loc 6
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Doctrine\ORM\Mapping\JoinColumn;
7
use Doctrine\ORM\Mapping\ManyToOne;
8
9
/**
10
 * PageBlock
11
 *
12
 * @ORM\Table(name="page_blocks")
13
 * @ORM\Entity(repositoryClass="AppBundle\Repository\PageRepository")
14
 */
15 View Code Duplication
class PageBlock
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     */
24
    private $id;
25
26
    /**
27
     * @var int
28
     *
29
     * @ORM\Column(name="page_group_id", type="integer")
30
     */
31
    private $pageGroupId;
32
33
    /**
34
     * @var string
35
     *
36
     * @ORM\Column(name="title", type="string", length=255)
37
     */
38
    private $title;
39
40
    /**
41
     * @var string
42
     *
43
     * @ORM\Column(name="html", type="text")
44
     */
45
    private $html;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="position", type="integer")
51
     */
52
    private $position;
53
54
    /**
55
     * @var \DateTime
56
     *
57
     * @ORM\Column(name="updated_at", type="datetime")
58
     */
59
    private $updatedAt;
60
61
    /**
62
     * @var int
63
     *
64
     * @ORM\Column(name="active", type="integer")
65
     */
66
    private $active;
67
68
    /**
69
     * Many PageBlocks have one PageGroup.
70
     *
71
     * @var integer PageGroup
72
     *
73
     * @ManyToOne(targetEntity="PageGroup", inversedBy="pageBlocks")
74
     * @JoinColumn(name="page_group_id", referencedColumnName="id")
75
     */
76
    private $pageGroup;
77
78
    /**
79
     * Get id
80
     *
81
     * @return int
82
     */
83
    public function getId()
84
    {
85
        return $this->id;
86
    }
87
88
    /**
89
     * Set pageGroupId
90
     *
91
     * @param integer $pageGroupId
0 ignored issues
show
introduced by
integer => int
Loading history...
92
     *
93
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
94
     */
95
    public function setPageGroupId($pageGroupId)
96
    {
97
        $this->pageGroupId = $pageGroupId;
98
99
        return $this;
100
    }
101
102
    /**
103
     * Get pageGroupId
104
     *
105
     * @return int
106
     */
107
    public function getPageGroupId()
108
    {
109
        return $this->pageGroupId;
110
    }
111
112
    /**
113
     * Set title
114
     *
115
     * @param string $title
116
     *
117
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
118
     */
119
    public function setTitle($title)
120
    {
121
        $this->title = $title;
122
123
        return $this;
124
    }
125
126
    /**
127
     * Get title
128
     *
129
     * @return string
130
     */
131
    public function getTitle()
132
    {
133
        return $this->title;
134
    }
135
136
    /**
137
     * Set html
138
     *
139
     * @param string $html
140
     *
141
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
142
     */
143
    public function setHtml($html)
144
    {
145
        $this->html = $html;
146
147
        return $this;
148
    }
149
150
    /**
151
     * Get html
152
     *
153
     * @return string
154
     */
155
    public function getHtml()
156
    {
157
        return $this->html;
158
    }
159
160
    /**
161
     * Set position
162
     *
163
     * @param integer $position
0 ignored issues
show
introduced by
integer => int
Loading history...
164
     *
165
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
166
     */
167
    public function setPosition($position)
168
    {
169
        $this->position = $position;
170
171
        return $this;
172
    }
173
174
    /**
175
     * Get position
176
     *
177
     * @return int
178
     */
179
    public function getPosition()
180
    {
181
        return $this->position;
182
    }
183
184
    /**
185
     * Set lastChanged
186
     *
187
     * @param \DateTime $updatedAt
188
     *
189
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
190
     */
191
    public function setUpdatedAt($updatedAt)
0 ignored issues
show
Coding Style introduced by
Type hint "\DateTime" missing for $updatedAt
Loading history...
192
    {
193
        $this->updatedAt = $updatedAt;
194
195
        return $this;
196
    }
197
198
    /**
199
     * Get lastChanged
200
     *
201
     * @return \DateTime
202
     */
203
    public function getUpdatedAt()
204
    {
205
        return $this->updatedAt;
206
    }
207
208
    /**
209
     * Set active
210
     *
211
     * @param integer $active
0 ignored issues
show
introduced by
integer => int
Loading history...
212
     *
213
     * @return PageBlock
0 ignored issues
show
introduced by
PageBlock => \Array\PageBlock
Loading history...
214
     */
215
    public function setActive($active)
216
    {
217
        $this->active = $active;
218
219
        return $this;
220
    }
221
222
    /**
223
     * Get active
224
     *
225
     * @return int
226
     */
227
    public function getActive()
228
    {
229
        return $this->active;
230
    }
231
232
    /**
233
     * @return PageGroup
0 ignored issues
show
introduced by
PageGroup => \Array\PageGroup
Loading history...
234
     */
235
    public function getPageGroup()
236
    {
237
        return $this->pageGroup;
238
    }
239
240
    /**
241
     * @param PageGroup $pageGroup
0 ignored issues
show
introduced by
PageGroup => \Array\PageGroup
Loading history...
242
     *
243
     * @return void
244
     */
245
    public function setPageGroup(PageGroup $pageGroup)
246
    {
247
        $this->pageGroup = $pageGroup;
0 ignored issues
show
Documentation Bug introduced by
It seems like $pageGroup of type object<AppBundle\Entity\PageGroup> is incompatible with the declared type integer of property $pageGroup.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
248
    }
249
}
250