Passed
Push — master ( 31fd3d...9d78ee )
by Agaletskiy
52s queued 14s
created

OrderProduct   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 64
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getGtin() 0 4 1
A getQuantity() 0 4 1
A getSerialNumberType() 0 4 1
A getTemplateId() 0 4 1
A getSerialNumbers() 0 4 1
A setSerialNumbers() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\OmsClient\V2\Dto;
6
7
abstract class OrderProduct
8
{
9
    public const SERIAL_NUMBER_TYPE_SELF_MADE = 'SELF_MADE';
10
    public const SERIAL_NUMBER_TYPE_OPERATOR = 'OPERATOR';
11
12
    /**
13
     * @var string
14
     */
15
    private $gtin;
16
    /**
17
     * @var int
18
     */
19
    private $quantity;
20
    /**
21
     * @var string
22
     */
23
    private $serialNumberType;
24
    /**
25
     * @var string[] | null
26
     */
27
    private $serialNumbers;
28
    /**
29
     * @var integer
30
     */
31
    private $templateId;
32
33
    public function __construct(string $gtin, int $quantity, string $serialNumberType, int $templateId)
34
    {
35
        $this->gtin = $gtin;
36
        $this->quantity = $quantity;
37
        $this->serialNumberType = $serialNumberType;
38
        $this->templateId = $templateId;
39
    }
40
41
    public function getGtin(): string
42
    {
43
        return $this->gtin;
44
    }
45
46
    public function getQuantity(): int
47
    {
48
        return $this->quantity;
49
    }
50
51
    public function getSerialNumberType(): string
52
    {
53
        return $this->serialNumberType;
54
    }
55
56
    public function getTemplateId(): int
57
    {
58
        return $this->templateId;
59
    }
60
61
    public function getSerialNumbers(): ?array
62
    {
63
        return $this->serialNumbers;
64
    }
65
66
    public function setSerialNumbers(?array $serialNumbers): void
67
    {
68
        $this->serialNumbers = $serialNumbers;
69
    }
70
}