Failed Conditions
Push — master ( 27554e...857869 )
by Luca
09:08
created

CardSimpleProperties::setTechnique()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Traits;
6
7
use Application\Utility;
8
use Doctrine\ORM\Mapping as ORM;
9
use Ecodev\Felix\Model\Traits\HasUrl;
10
11
/**
12
 * Trait for "simple" properties of an card.
13
 *
14
 * They are mostly what was called "meta" in the old DILPS. And we split
15
 * them only to reduce the Card class size to focus on most important code.
16
 */
17
trait CardSimpleProperties
18
{
19
    use HasUrl;
20
21
    /**
22
     * @var string
23
     *
24
     * @ORM\Column(type="text", options={"default" = ""})
25
     */
26
    private $addition = '';
27
28
    /**
29
     * @var string
30
     *
31
     * @ORM\Column(type="text", options={"default" = ""})
32
     */
33
    private $expandedName = '';
34
35
    /**
36
     * @var string
37
     *
38
     * @ORM\Column(type="string", options={"default" = ""})
39
     */
40
    private $material = '';
41
42
    /**
43
     * @var string
44
     *
45
     * @ORM\Column(type="string", options={"default" = ""})
46
     */
47
    private $dilpsDomain = '';
48
49
    /**
50
     * @var string
51
     *
52
     * @ORM\Column(type="string", options={"default" = ""})
53
     */
54
    private $techniqueAuthor = '';
55
56
    /**
57
     * @var string
58
     *
59
     * @ORM\Column(type="string", length=60, options={"default" = ""})
60
     */
61
    private $techniqueDate = '';
62
63
    /**
64
     * @var string
65
     *
66
     * @ORM\Column(type="string", options={"default" = ""})
67
     */
68
    private $format = '';
69
70
    /**
71
     * @var string
72
     *
73
     * @ORM\Column(type="text", options={"default" = ""})
74
     */
75
    private $literature = '';
76
77
    /**
78
     * @var string
79
     *
80
     * @ORM\Column(type="text", options={"default" = ""})
81
     */
82
    private $objectReference = '';
83
84
    /**
85
     * @var string
86
     *
87
     * @ORM\Column(type="string", length=10, options={"default" = ""})
88
     */
89
    private $page = '';
90
91
    /**
92
     * @var string
93
     *
94
     * @ORM\Column(type="string", length=10, options={"default" = ""})
95
     */
96
    private $figure = '';
97
98
    /**
99
     * @var string
100
     *
101
     * @ORM\Column(name="`table`", type="string", length=10, options={"default" = ""})
102
     */
103
    private $table = '';
104
105
    /**
106
     * @var string
107
     *
108
     * @ORM\Column(type="string", length=30, options={"default" = ""})
109
     */
110
    private $isbn = '';
111
112
    /**
113
     * @var string
114
     *
115
     * @ORM\Column(type="text")
116
     */
117
    private $comment = '';
118
119
    /**
120
     * @var string
121
     *
122
     * @ORM\Column(type="text")
123
     */
124
    private $corpus = '';
125
126
    /**
127
     * @var string
128
     *
129
     * @ORM\Column(type="string", options={"default" = ""})
130
     */
131
    private $rights = '';
132
133
    /**
134
     * @var string
135
     *
136
     * @ORM\Column(type="string", options={"default" = ""})
137
     */
138
    private $muserisUrl = '';
139
140
    /**
141
     * @var string
142
     *
143
     * @ORM\Column(type="string", options={"default" = ""})
144
     */
145
    private $muserisCote = '';
146
147
    /**
148
     * @var string
149
     *
150
     * @ORM\Column(type="string", length=60, options={"default" = ""})
151
     */
152
    private $productionPlace = '';
153
154
    /**
155
     * @var string
156
     *
157
     * @ORM\Column(type="text", options={"default" = ""})
158
     */
159
    private $urlDescription = '';
160
161 3
    public function getAddition(): string
162
    {
163 3
        return $this->addition;
164
    }
165
166 8
    public function setAddition(string $addition): void
167
    {
168 8
        $this->addition = $addition;
169
    }
170
171 5
    public function getExpandedName(): string
172
    {
173 5
        return $this->expandedName;
174
    }
175
176 13
    public function setExpandedName(string $expandedName): void
177
    {
178 13
        $this->expandedName = Utility::sanitizeRichText($expandedName);
179
    }
180
181 4
    public function getMaterial(): string
182
    {
183 4
        return $this->material;
184
    }
185
186 8
    public function setMaterial(string $material): void
187
    {
188 8
        $this->material = $material;
189
    }
190
191 3
    public function getDilpsDomain(): string
192
    {
193 3
        return $this->dilpsDomain;
194
    }
195
196 8
    public function setDilpsDomain(string $dilpsDomain): void
197
    {
198 8
        $this->dilpsDomain = $dilpsDomain;
199
    }
200
201 3
    public function getTechniqueAuthor(): string
202
    {
203 3
        return $this->techniqueAuthor;
204
    }
205
206 9
    public function setTechniqueAuthor(string $techniqueAuthor): void
207
    {
208 9
        $this->techniqueAuthor = $techniqueAuthor;
209
    }
210
211 3
    public function getTechniqueDate(): string
212
    {
213 3
        return $this->techniqueDate;
214
    }
215
216 8
    public function setTechniqueDate(string $techniqueDate): void
217
    {
218 8
        $this->techniqueDate = $techniqueDate;
219
    }
220
221 4
    public function getFormat(): string
222
    {
223 4
        return $this->format;
224
    }
225
226 8
    public function setFormat(string $format): void
227
    {
228 8
        $this->format = $format;
229
    }
230
231 3
    public function getLiterature(): string
232
    {
233 3
        return $this->literature;
234
    }
235
236 8
    public function setLiterature(string $literature): void
237
    {
238 8
        $this->literature = Utility::sanitizeRichText($literature);
239
    }
240
241 3
    public function getObjectReference(): string
242
    {
243 3
        return $this->objectReference;
244
    }
245
246 8
    public function setObjectReference(string $objectReference): void
247
    {
248 8
        $this->objectReference = $objectReference;
249
    }
250
251 3
    public function getPage(): string
252
    {
253 3
        return $this->page;
254
    }
255
256 8
    public function setPage(string $page): void
257
    {
258 8
        $this->page = $page;
259
    }
260
261 3
    public function getFigure(): string
262
    {
263 3
        return $this->figure;
264
    }
265
266 8
    public function setFigure(string $figure): void
267
    {
268 8
        $this->figure = $figure;
269
    }
270
271 3
    public function getTable(): string
272
    {
273 3
        return $this->table;
274
    }
275
276 8
    public function setTable(string $table): void
277
    {
278 8
        $this->table = $table;
279
    }
280
281 3
    public function getIsbn(): string
282
    {
283 3
        return $this->isbn;
284
    }
285
286 8
    public function setIsbn(string $isbn): void
287
    {
288 8
        $this->isbn = $isbn;
289
    }
290
291
    public function getComment(): string
292
    {
293
        return $this->comment;
294
    }
295
296 8
    public function setComment(string $comment): void
297
    {
298 8
        $this->comment = $comment;
299
    }
300
301
    public function getCorpus(): string
302
    {
303
        return $this->corpus;
304
    }
305
306 7
    public function setCorpus(string $corpus): void
307
    {
308 7
        $this->corpus = Utility::sanitizeRichText($corpus);
309
    }
310
311
    public function getRights(): string
312
    {
313
        return $this->rights;
314
    }
315
316 8
    public function setRights(string $rights): void
317
    {
318 8
        $this->rights = $rights;
319
    }
320
321
    public function getMuserisUrl(): string
322
    {
323
        return $this->muserisUrl;
324
    }
325
326 8
    public function setMuserisUrl(string $muserisUrl): void
327
    {
328 8
        $this->muserisUrl = $muserisUrl;
329
    }
330
331
    public function getMuserisCote(): string
332
    {
333
        return $this->muserisCote;
334
    }
335
336 8
    public function setMuserisCote(string $muserisCote): void
337
    {
338 8
        $this->muserisCote = $muserisCote;
339
    }
340
341 3
    public function getProductionPlace(): string
342
    {
343 3
        return $this->productionPlace;
344
    }
345
346 8
    public function setProductionPlace(string $productionPlace): void
347
    {
348 8
        $this->productionPlace = $productionPlace;
349
    }
350
351
    public function getUrlDescription(): string
352
    {
353
        return $this->urlDescription;
354
    }
355
356 7
    public function setUrlDescription(string $urlDescription): void
357
    {
358 7
        $this->urlDescription = Utility::sanitizeRichText($urlDescription);
359
    }
360
}
361