Completed
Push — master ( 6cd8ca...cbb2b9 )
by Paweł
63:35
created

BaseContent::setLocated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Bridge Component.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Component\Bridge\Model;
16
17
class BaseContent implements ContentInterface
18
{
19
    /**
20
     * @var mixed
21
     */
22
    protected $id;
23
24
    /**
25
     * @var string
26
     */
27
    protected $guid;
28
29
    /**
30
     * @var string
31
     */
32
    protected $headline;
33
34
    /**
35
     * @var string
36
     */
37
    protected $byline;
38
39
    /**
40
     * @var string
41
     */
42
    protected $slugline;
43
44
    /**
45
     * @var string
46
     */
47
    protected $language;
48
49
    /**
50
     * @var array
51
     */
52
    protected $subjects = [];
53
54
    /**
55
     * @var string
56
     */
57
    protected $type;
58
59
    /**
60
     * @var array
61
     */
62
    protected $places = [];
63
64
    /**
65
     * @var array
66
     */
67
    protected $services = [];
68
69
    /**
70
     * @var string
71
     */
72
    protected $located;
73
74
    /**
75
     * @var int
76
     */
77
    protected $urgency;
78
79
    /**
80
     * @var int
81
     */
82
    protected $priority;
83
84
    /**
85
     * @var int
86
     */
87
    protected $version;
88
89
    /**
90
     * @var string
91
     */
92
    protected $genre;
93
94
    /**
95
     * @var string
96
     */
97
    protected $edNote;
98
99
    /**
100
     * @var string
101
     */
102
    protected $description;
103
104
    /**
105
     * @var array
106
     */
107
    protected $keywords = [];
108
109
    /**
110
     * @var string
111
     */
112
    protected $pubStatus = ContentInterface::STATUS_USABLE;
113
114
    /**
115
     * @var string|null
116
     */
117
    protected $evolvedFrom;
118
119
    /**
120
     * @return mixed
121
     */
122
    public function getId()
123
    {
124
        return $this->id;
125
    }
126
127
    /**
128 11
     * {@inheritdoc}
129
     */
130 11
    public function setId($id)
131
    {
132
        $this->id = $id;
133
    }
134
135
    /**
136
     * {@inheritdoc}
137
     */
138
    public function getByline()
139
    {
140
        return $this->byline;
141
    }
142
143
    /**
144 11
     * {@inheritdoc}
145
     */
146 11
    public function setByline($byline)
147
    {
148
        $this->byline = $byline;
149
    }
150
151
    /**
152
     * {@inheritdoc}
153
     */
154
    public function getSlugline()
155
    {
156
        return $this->slugline;
157
    }
158
159
    /**
160 11
     * {@inheritdoc}
161
     */
162 11
    public function setSlugline($slugline)
163
    {
164
        $this->slugline = $slugline;
165
    }
166
167
    /**
168
     * {@inheritdoc}
169
     */
170
    public function getLanguage()
171
    {
172
        return $this->language;
173
    }
174
175
    /**
176 11
     * {@inheritdoc}
177
     */
178 11
    public function setLanguage($language)
179
    {
180
        $this->language = $language;
181
    }
182
183
    /**
184
     * {@inheritdoc}
185
     */
186
    public function getSubjects()
187
    {
188
        return $this->subjects;
189
    }
190
191
    /**
192 11
     * {@inheritdoc}
193
     */
194 11
    public function setSubjects(array $subjects = [])
195
    {
196
        $this->subjects = $subjects;
197
    }
198
199
    /**
200
     * {@inheritdoc}
201
     */
202
    public function getType()
203
    {
204
        return $this->type;
205
    }
206
207
    /**
208 11
     * {@inheritdoc}
209
     */
210 11
    public function setType($type)
211
    {
212
        $this->type = $type;
213
    }
214
215
    /**
216
     * {@inheritdoc}
217
     */
218
    public function getPlaces()
219
    {
220
        return $this->places;
221
    }
222
223
    /**
224 11
     * {@inheritdoc}
225
     */
226 11
    public function setPlaces($places)
227
    {
228
        $this->places = $places;
229
    }
230
231
    /**
232
     * {@inheritdoc}
233
     */
234
    public function getLocated()
235
    {
236
        return $this->located;
237
    }
238
239
    /**
240 11
     * {@inheritdoc}
241
     */
242 11
    public function setLocated($located)
243
    {
244
        $this->located = $located;
245
    }
246
247
    /**
248
     * {@inheritdoc}
249
     */
250
    public function getUrgency()
251
    {
252
        return $this->urgency;
253
    }
254
255
    /**
256 11
     * {@inheritdoc}
257
     */
258 11
    public function setUrgency($urgency)
259
    {
260
        $this->urgency = $urgency;
261
    }
262
263
    /**
264
     * {@inheritdoc}
265
     */
266
    public function getPriority()
267
    {
268
        return $this->priority;
269
    }
270
271
    /**
272
     * {@inheritdoc}
273
     */
274
    public function setPriority($priority)
275
    {
276
        $this->priority = $priority;
277
    }
278
279
    /**
280
     * {@inheritdoc}
281
     */
282
    public function getVersion()
283
    {
284
        return $this->version;
285
    }
286
287
    /**
288 11
     * {@inheritdoc}
289
     */
290 11
    public function setVersion($version)
291
    {
292
        $this->version = $version;
293
    }
294
295
    /**
296
     * {@inheritdoc}
297
     */
298
    public function getHeadline()
299
    {
300
        return $this->headline;
301
    }
302
303
    /**
304 11
     * {@inheritdoc}
305
     */
306 11
    public function setHeadline($headline)
307
    {
308
        $this->headline = $headline;
309
    }
310
311
    /**
312
     * {@inheritdoc}
313
     */
314
    public function getGuid()
315
    {
316
        return $this->guid;
317
    }
318
319
    /**
320 11
     * {@inheritdoc}
321
     */
322 11
    public function setGuid($guid)
323
    {
324
        $this->guid = $guid;
325
    }
326
327
    /**
328
     * {@inheritdoc}
329
     */
330
    public function getServices()
331
    {
332
        return $this->services;
333
    }
334
335
    /**
336 11
     * {@inheritdoc}
337
     */
338 11
    public function setServices(array $services = [])
339
    {
340
        $this->services = $services;
341
    }
342
343
    /**
344
     * {@inheritdoc}
345
     */
346
    public function getEdNote()
347
    {
348
        return $this->edNote;
349
    }
350
351
    /**
352 11
     * {@inheritdoc}
353
     */
354 11
    public function setEdNote($edNote)
355
    {
356
        $this->edNote = $edNote;
357
    }
358
359
    /**
360
     * {@inheritdoc}
361
     */
362
    public function getGenre()
363
    {
364
        return $this->genre;
365
    }
366
367
    /**
368 11
     * {@inheritdoc}
369
     */
370 11
    public function setGenre($genre)
371
    {
372
        $this->genre = $genre;
373
    }
374
375
    /**
376
     * @return string
377
     */
378
    public function getDescription()
379
    {
380
        return $this->description;
381
    }
382
383
    /**
384 11
     * @param string $description
385
     */
386
    public function setDescription($description)
387 11
    {
388 11
        $this->description = $description;
389 11
    }
390 11
391 11
    /**
392 11
     * {@inheritdoc}
393 11
     */
394 11
    public function getMetadata()
395 11
    {
396 11
        return [
397 11
            'subject' => $this->getSubjects(),
398 11
            'urgency' => $this->getUrgency(),
399
            'priority' => $this->getPriority(),
400
            'located' => $this->getLocated(),
401
            'place' => $this->getPlaces(),
402
            'service' => $this->getServices(),
403
            'type' => $this->getType(),
404
            'byline' => $this->getByline(),
405 11
            'guid' => $this->getGuid(),
406
            'edNote' => $this->getEdNote(),
407 11
            'genre' => $this->getGenre(),
408
            'language' => $this->getLanguage(),
409
        ];
410
    }
411
412
    /**
413
     * {@inheritdoc}
414
     */
415
    public function getKeywords(): array
416
    {
417
        return $this->keywords;
418
    }
419
420
    /**
421
     * {@inheritdoc}
422
     */
423
    public function setKeywords(array $keywords)
424
    {
425
        $this->keywords = $keywords;
426
    }
427
428
    /**
429
     * {@inheritdoc}
430
     */
431
    public function getPubStatus(): string
432
    {
433
        return $this->pubStatus;
434
    }
435
436
    /**
437
     * {@inheritdoc}
438
     */
439
    public function setPubStatus(string $pubStatus)
440
    {
441
        $this->pubStatus = $pubStatus;
442
    }
443
444
    /**
445
     * {@inheritdoc}
446
     */
447
    public function getEvolvedFrom()
448
    {
449
        return $this->evolvedFrom;
450
    }
451
452
    /**
453
     * {@inheritdoc}
454
     */
455
    public function setEvolvedFrom(string $evolvedFrom)
456
    {
457
        $this->evolvedFrom = $evolvedFrom;
458
    }
459
}
460