Character::setCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace App\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as JMS;
7
8
/**
9
 * @ORM\Entity(repositoryClass="App\Repository\CharacterRepository")
10
 * @ORM\Table(name="characters")
11
 *
12
 * @JMS\ExclusionPolicy("all")
13
 */
14
class Character
15
{
16
    /**
17
     * @ORM\Id
18
     * @ORM\GeneratedValue
19
     * @ORM\Column(type="integer")
20
     *
21
     * @JMS\Groups({"characters"})
22
     * @JMS\Expose
23
     */
24
    private $id;
25
26
    /**
27
     * @ORM\Column(type="string")
28
     *
29
     * @JMS\Groups({"characters"})
30
     * @JMS\Expose
31
     */
32
    private $code = '';
33
34
    /**
35
     * @ORM\Column(type="string")
36
     *
37
     * @JMS\Groups({"characters"})
38
     * @JMS\Expose
39
     */
40
    private $name = '';
41
42
    /**
43
     * @ORM\Column(type="integer")
44
     *
45
     * @JMS\Groups({"characters"})
46
     * @JMS\Expose
47
     */
48
    private $side = 0;
49
50
    /**
51
     * @ORM\Column(type="string")
52
     *
53
     * @JMS\Groups({"characters"})
54
     * @JMS\Expose
55
     */
56
    private $image = '';
57
58
    /**
59
     * @ORM\Column(type="string")
60
     *
61
     * @JMS\Groups({"characters"})
62
     * @JMS\Expose
63
     */
64
    private $description = '';
65
66
    /**
67
     * @ORM\Column(type="json_array")
68
     */
69
    private $tags = '';
70
71
    /**
72
     * Get id.
73
     *
74
     * @return int
75
     */
76
    public function getId()
77
    {
78
        return $this->id;
79
    }
80
81
    /**
82
     * Set code.
83
     *
84
     * @param string $code
85
     *
86
     * @return Character
87
     */
88
    public function setCode($code)
89
    {
90
        $this->code = $code;
91
92
        return $this;
93
    }
94
95
    /**
96
     * Get code.
97
     *
98
     * @return string
99
     */
100
    public function getCode()
101
    {
102
        return $this->code;
103
    }
104
105
    /**
106
     * Set name.
107
     *
108
     * @param string $name
109
     *
110
     * @return Character
111
     */
112
    public function setName($name)
113
    {
114
        $this->name = $name;
115
116
        return $this;
117
    }
118
119
    /**
120
     * Get name.
121
     *
122
     * @return string
123
     */
124
    public function getName()
125
    {
126
        return $this->name;
127
    }
128
129
    /**
130
     * Set side.
131
     *
132
     * @param int $side
133
     *
134
     * @return Character
135
     */
136
    public function setSide($side)
137
    {
138
        $this->side = $side;
139
140
        return $this;
141
    }
142
143
    /**
144
     * Get side.
145
     *
146
     * @return int
147
     */
148
    public function getSide()
149
    {
150
        return $this->side;
151
    }
152
153
    /**
154
     * Set image.
155
     *
156
     * @param string $image
157
     *
158
     * @return Character
159
     */
160
    public function setImage($image)
161
    {
162
        $this->image = $image;
163
164
        return $this;
165
    }
166
167
    /**
168
     * Get image.
169
     *
170
     * @return string
171
     */
172
    public function getImage()
173
    {
174
        return $this->image;
175
    }
176
177
    /**
178
     * Set description.
179
     *
180
     * @param string $description
181
     *
182
     * @return Character
183
     */
184
    public function setDescription($description)
185
    {
186
        $this->description = $description;
187
188
        return $this;
189
    }
190
191
    /**
192
     * Get description.
193
     *
194
     * @return string
195
     */
196
    public function getDescription()
197
    {
198
        return $this->description;
199
    }
200
201
    /**
202
     * Set tags.
203
     *
204
     * @param array $tags
205
     *
206
     * @return Character
207
     */
208
    public function setTags($tags)
209
    {
210
        $this->tags = $tags;
0 ignored issues
show
Documentation Bug introduced by
It seems like $tags of type array is incompatible with the declared type string of property $tags.

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...
211
212
        return $this;
213
    }
214
215
    /**
216
     * Get tags.
217
     *
218
     * @return array
219
     */
220
    public function getTags()
221
    {
222
        return $this->tags;
223
    }
224
}
225