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
Push — master ( d6ef0b...33031e )
by Mohamed
20:31 queued 16:33
created

ArticleDetail::setMaxPurchase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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