Total Complexity | 11 |
Total Lines | 125 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 0 |
1 | <?php |
||
17 | class WorkingVolume implements Box, JsonSerializable |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $width; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $length; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $depth; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | private $maxWeight; |
||
38 | |||
39 | /** |
||
40 | * Constructor. |
||
41 | * |
||
42 | * @param int $width |
||
43 | * @param int $length |
||
44 | * @param int $depth |
||
45 | * @param int $maxWeight |
||
46 | */ |
||
47 | 2 | public function __construct( |
|
48 | int $width, |
||
49 | int $length, |
||
50 | int $depth, |
||
51 | int $maxWeight |
||
52 | ) { |
||
53 | 2 | $this->width = $width; |
|
54 | 2 | $this->length = $length; |
|
55 | 2 | $this->depth = $depth; |
|
56 | 2 | $this->maxWeight = $maxWeight; |
|
57 | 2 | } |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 2 | public function getReference(): string |
|
63 | { |
||
64 | 2 | return 'Working Volume'; |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getOuterWidth(): int |
||
71 | { |
||
72 | return $this->width; |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * @return int |
||
77 | */ |
||
78 | public function getOuterLength(): int |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getOuterDepth(): int |
||
87 | { |
||
88 | return $this->depth; |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | */ |
||
94 | 2 | public function getEmptyWeight(): int |
|
97 | } |
||
98 | |||
99 | /** |
||
100 | * @return int |
||
101 | */ |
||
102 | 2 | public function getInnerWidth(): int |
|
103 | { |
||
104 | 2 | return $this->width; |
|
105 | } |
||
106 | |||
107 | /** |
||
108 | * @return int |
||
109 | */ |
||
110 | 2 | public function getInnerLength(): int |
|
111 | { |
||
112 | 2 | return $this->length; |
|
113 | } |
||
114 | |||
115 | /** |
||
116 | * @return int |
||
117 | */ |
||
118 | 2 | public function getInnerDepth(): int |
|
121 | } |
||
122 | |||
123 | /** |
||
124 | * @return int |
||
125 | */ |
||
126 | 2 | public function getMaxWeight(): int |
|
127 | { |
||
128 | 2 | return $this->maxWeight; |
|
129 | } |
||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | public function jsonSerialize(): array |
||
142 | ]; |
||
143 | } |
||
144 | } |
||
145 |