GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#14)
by
unknown
22:00
created

Article::setMainDetail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * LeadCommerce\Shopware\SDK\Entity
4
 *
5
 * Copyright 2016 LeadCommerce
6
 *
7
 * @author Alexander Mahrt <[email protected]>
8
 * @copyright 2016 LeadCommerce <[email protected]>
9
 */
10
namespace LeadCommerce\Shopware\SDK\Entity;
11
12
/**
13
 * Class Article
14
 */
15
class Article extends Base
16
{
17
    /**
18
     * @var int
19
     */
20
    protected $id;
21
    /**
22
     * @var int
23
     */
24
    protected $mainDetailId;
25
    /**
26
     * @var int
27
     */
28
    protected $supplierId;
29
    /**
30
     * @var int
31
     */
32
    protected $taxId;
33
    /**
34
     * @var int
35
     */
36
    protected $priceGroupId;
37
    /**
38
     * @var int
39
     */
40
    protected $filterGroupId;
41
    /**
42
     * @var int
43
     */
44
    protected $configuratorSetId;
45
    /**
46
     * @var string
47
     */
48
    protected $name;
49
    /**
50
     * @var string
51
     */
52
    protected $description;
53
    /**
54
     * @var string
55
     */
56
    protected $descriptionLong;
57
    /**
58
     * @var string
59
     */
60
    protected $added;
61
    /**
62
     * @var bool
63
     */
64
    protected $active;
65
    /**
66
     * @var int
67
     */
68
    protected $pseudoSales;
69
    /**
70
     * @var bool
71
     */
72
    protected $highlight;
73
    /**
74
     * @var string
75
     */
76
    protected $keywords;
77
    /**
78
     * @var string
79
     */
80
    protected $metaTitle;
81
    /**
82
     * @var string
83
     */
84
    protected $changed;
85
    /**
86
     * @var bool
87
     */
88
    protected $priceGroupActive;
89
    /**
90
     * @var bool
91
     */
92
    protected $lastStock;
93
    /**
94
     * @var bool
95
     */
96
    protected $crossBundleLook;
97
    /**
98
     * @var bool
99
     */
100
    protected $notification;
101
    /**
102
     * @var string
103
     */
104
    protected $template;
105
    /**
106
     * @var int
107
     */
108
    protected $mode;
109
    /**
110
     * @var string
111
     */
112
    protected $availableFrom;
113
    /**
114
     * @var string
115
     */
116
    protected $availableTo;
117
    /**
118
     * @var ArticleAttribute
119
     */
120
    protected $attribute;
121
    /**
122
     * @var Category[]
123
     */
124
    protected $categories;
125
    /**
126
     * @var ArticleDetail
127
     */
128
    protected $mainDetail;
129 4
130
    /**
131 4
     * @return int
132
     */
133
    public function getId()
134
    {
135
        return $this->id;
136
    }
137
138
    /**
139 5
     * @param int $id
140
     *
141 5
     * @return Article
142
     */
143 5
    public function setId($id)
144
    {
145
        $this->id = $id;
146
147
        return $this;
148
    }
149 2
150
    /**
151 2
     * @return int
152
     */
153
    public function getMainDetailId()
154
    {
155
        return $this->mainDetailId;
156
    }
157
158
    /**
159 5
     * @param int $mainDetailId
160
     *
161 5
     * @return Article
162
     */
163 5
    public function setMainDetailId($mainDetailId)
164
    {
165
        $this->mainDetailId = $mainDetailId;
166
167
        return $this;
168
    }
169
170
    /**
171
     * @return int
172
     */
173
    public function getSupplierId()
174
    {
175
        return $this->supplierId;
176
    }
177
178
    /**
179 5
     * @param int $supplierId
180
     *
181 5
     * @return Article
182
     */
183 5
    public function setSupplierId($supplierId)
184
    {
185
        $this->supplierId = $supplierId;
186
187
        return $this;
188
    }
189
190
    /**
191
     * @return int
192
     */
193
    public function getTaxId()
194
    {
195
        return $this->taxId;
196
    }
197
198
    /**
199 5
     * @param int $taxId
200
     *
201 5
     * @return Article
202
     */
203 5
    public function setTaxId($taxId)
204
    {
205
        $this->taxId = $taxId;
206
207
        return $this;
208
    }
209
210
    /**
211
     * @return int
212
     */
213
    public function getPriceGroupId()
214
    {
215
        return $this->priceGroupId;
216
    }
217
218
    /**
219 5
     * @param int $priceGroupId
220
     *
221 5
     * @return Article
222
     */
223 5
    public function setPriceGroupId($priceGroupId)
224
    {
225
        $this->priceGroupId = $priceGroupId;
226
227
        return $this;
228
    }
229
230
    /**
231
     * @return int
232
     */
233
    public function getFilterGroupId()
234
    {
235
        return $this->filterGroupId;
236
    }
237
238
    /**
239 5
     * @param int $filterGroupId
240
     *
241 5
     * @return Article
242
     */
243 5
    public function setFilterGroupId($filterGroupId)
244
    {
245
        $this->filterGroupId = $filterGroupId;
246
247
        return $this;
248
    }
249
250
    /**
251
     * @return int
252
     */
253
    public function getConfiguratorSetId()
254
    {
255
        return $this->configuratorSetId;
256
    }
257
258
    /**
259 5
     * @param int $configuratorSetId
260
     *
261 5
     * @return Article
262
     */
263 5
    public function setConfiguratorSetId($configuratorSetId)
264
    {
265
        $this->configuratorSetId = $configuratorSetId;
266
267
        return $this;
268
    }
269 4
270
    /**
271 4
     * @return string
272
     */
273
    public function getName()
274
    {
275
        return $this->name;
276
    }
277
278
    /**
279 5
     * @param string $name
280
     *
281 5
     * @return Article
282
     */
283 5
    public function setName($name)
284
    {
285
        $this->name = $name;
286
287
        return $this;
288
    }
289
290
    /**
291
     * @return string
292
     */
293
    public function getDescription()
294
    {
295
        return $this->description;
296
    }
297
298
    /**
299 5
     * @param string $description
300
     *
301 5
     * @return Article
302
     */
303 5
    public function setDescription($description)
304
    {
305
        $this->description = $description;
306
307
        return $this;
308
    }
309
310
    /**
311
     * @return string
312
     */
313
    public function getDescriptionLong()
314
    {
315
        return $this->descriptionLong;
316
    }
317
318
    /**
319 5
     * @param string $descriptionLong
320
     *
321 5
     * @return Article
322
     */
323 5
    public function setDescriptionLong($descriptionLong)
324
    {
325
        $this->descriptionLong = $descriptionLong;
326
327
        return $this;
328
    }
329
330
    /**
331
     * @return string
332
     */
333
    public function getAdded()
334
    {
335
        return $this->added;
336
    }
337
338
    /**
339 5
     * @param string $added
340
     *
341 5
     * @return Article
342
     */
343 5
    public function setAdded($added)
344
    {
345
        $this->added = $added;
346
347
        return $this;
348
    }
349 2
350
    /**
351 2
     * @return bool
352
     */
353
    public function isActive()
354
    {
355
        return $this->active;
356
    }
357
358
    /**
359 5
     * @param bool $active
360
     *
361 5
     * @return Article
362
     */
363 5
    public function setActive($active)
364
    {
365
        $this->active = $active;
366
367
        return $this;
368
    }
369
370
    /**
371
     * @return int
372
     */
373
    public function getPseudoSales()
374
    {
375
        return $this->pseudoSales;
376
    }
377
378
    /**
379 5
     * @param int $pseudoSales
380
     *
381 5
     * @return Article
382
     */
383 5
    public function setPseudoSales($pseudoSales)
384
    {
385
        $this->pseudoSales = $pseudoSales;
386
387
        return $this;
388
    }
389
390
    /**
391
     * @return bool
392
     */
393
    public function isHighlight()
394
    {
395
        return $this->highlight;
396
    }
397
398
    /**
399 5
     * @param bool $highlight
400
     *
401 5
     * @return Article
402
     */
403 5
    public function setHighlight($highlight)
404
    {
405
        $this->highlight = $highlight;
406
407
        return $this;
408
    }
409
410
    /**
411
     * @return string
412
     */
413
    public function getKeywords()
414
    {
415
        return $this->keywords;
416
    }
417
418
    /**
419 5
     * @param string $keywords
420
     *
421 5
     * @return Article
422
     */
423 5
    public function setKeywords($keywords)
424
    {
425
        $this->keywords = $keywords;
426
427
        return $this;
428
    }
429
430
    /**
431
     * @return string
432
     */
433
    public function getMetaTitle()
434
    {
435
        return $this->metaTitle;
436
    }
437
438
    /**
439 5
     * @param string $metaTitle
440
     *
441 5
     * @return Article
442
     */
443 5
    public function setMetaTitle($metaTitle)
444
    {
445
        $this->metaTitle = $metaTitle;
446
447
        return $this;
448
    }
449
450
    /**
451
     * @return string
452
     */
453
    public function getChanged()
454
    {
455
        return $this->changed;
456
    }
457
458
    /**
459
     * @param string $changed
460
     *
461
     * @return Article
462
     */
463
    public function setChanged($changed)
464
    {
465
        $this->changed = $changed;
466
467
        return $this;
468
    }
469
470
    /**
471
     * @return bool
472
     */
473
    public function isPriceGroupActive()
474
    {
475
        return $this->priceGroupActive;
476
    }
477
478
    /**
479 5
     * @param bool $priceGroupActive
480
     *
481 5
     * @return Article
482
     */
483 5
    public function setPriceGroupActive($priceGroupActive)
484
    {
485
        $this->priceGroupActive = $priceGroupActive;
486
487
        return $this;
488
    }
489
490
    /**
491
     * @return bool
492
     */
493
    public function isLastStock()
494
    {
495
        return $this->lastStock;
496
    }
497
498
    /**
499 5
     * @param bool $lastStock
500
     *
501 5
     * @return Article
502
     */
503 5
    public function setLastStock($lastStock)
504
    {
505
        $this->lastStock = $lastStock;
506
507
        return $this;
508
    }
509
510
    /**
511
     * @return bool
512
     */
513
    public function isCrossBundleLook()
514
    {
515
        return $this->crossBundleLook;
516
    }
517
518
    /**
519 5
     * @param bool $crossBundleLook
520
     *
521 5
     * @return Article
522
     */
523 5
    public function setCrossBundleLook($crossBundleLook)
524
    {
525
        $this->crossBundleLook = $crossBundleLook;
526
527
        return $this;
528
    }
529
530
    /**
531
     * @return bool
532
     */
533
    public function isNotification()
534
    {
535
        return $this->notification;
536
    }
537
538
    /**
539 5
     * @param bool $notification
540
     *
541 5
     * @return Article
542
     */
543 5
    public function setNotification($notification)
544
    {
545
        $this->notification = $notification;
546
547
        return $this;
548
    }
549
550
    /**
551
     * @return string
552
     */
553
    public function getTemplate()
554
    {
555
        return $this->template;
556
    }
557
558
    /**
559 5
     * @param string $template
560
     *
561 5
     * @return Article
562
     */
563 5
    public function setTemplate($template)
564
    {
565
        $this->template = $template;
566
567
        return $this;
568
    }
569
570
    /**
571
     * @return int
572
     */
573
    public function getMode()
574
    {
575
        return $this->mode;
576
    }
577
578
    /**
579 5
     * @param int $mode
580
     *
581 5
     * @return Article
582
     */
583 5
    public function setMode($mode)
584
    {
585
        $this->mode = $mode;
586
587
        return $this;
588
    }
589
590
    /**
591
     * @return string
592
     */
593
    public function getAvailableFrom()
594
    {
595
        return $this->availableFrom;
596
    }
597
598
    /**
599 5
     * @param string $availableFrom
600
     *
601 5
     * @return Article
602
     */
603 5
    public function setAvailableFrom($availableFrom)
604
    {
605
        $this->availableFrom = $availableFrom;
606
607
        return $this;
608
    }
609
610
    /**
611
     * @return string
612
     */
613
    public function getAvailableTo()
614
    {
615
        return $this->availableTo;
616
    }
617
618
    /**
619 5
     * @param string $availableTo
620
     *
621 5
     * @return Article
622
     */
623 5
    public function setAvailableTo($availableTo)
624
    {
625
        $this->availableTo = $availableTo;
626
627
        return $this;
628
    }
629
630
    /**
631
     * @return array
632
     */
633
    public function getAttributes()
634
    {
635
        return $this->attribute;
636
    }
637
638
    /**
639
     * @param ArticleAttribute $attributes
640
     *
641
     * @return Article
642
     */
643
    public function setAttributes($attributes)
644
    {
645
        $this->attribute = $attributes;
646
647
        return $this;
648
    }
649
650
    /**
651
     * @return mixed
652
     */
653
    public function getCategories()
654
    {
655
        return $this->categories;
656
    }
657
658
    /**
659
     * @param Category[] $categories
660
     *
661
     * @return Article
662
     */
663
    public function setCategories($categories)
664
    {
665
        $this->categories = $categories;
666
667
        return $this;
668
    }
669
670
    /**
671
     * @return ArticleDetail
672
     */
673
    public function getMainDetail(): ArticleDetail
674
    {
675
        return $this->mainDetail;
676
    }
677
678
    /**
679
     * @param ArticleDetail $mainDetail
680
     */
681
    public function setMainDetail(ArticleDetail $mainDetail)
682
    {
683
        $this->mainDetail = $mainDetail;
684
    }
685
686
687
    /**
688
     * @return array
689
     */
690
    public function getArrayCopy()
691
    {
692
        $arrayCopy = parent::getArrayCopy();
693
        if (!empty($arrayCopy['taxId'])) {
694
            $arrayCopy['tax'] = $arrayCopy['taxId'];
695
            unset($arrayCopy['taxId']);
696
        }
697
        return $arrayCopy;
698
    }
699
700
701
}
702