Total Complexity | 11 |
Total Lines | 93 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 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 | 42 | public function __construct( |
|
43 | int $width, |
||
44 | int $length, |
||
45 | int $depth, |
||
46 | int $maxWeight |
||
47 | ) { |
||
48 | 42 | $this->width = $width; |
|
49 | 42 | $this->length = $length; |
|
50 | 42 | $this->depth = $depth; |
|
51 | 42 | $this->maxWeight = $maxWeight; |
|
52 | 42 | } |
|
53 | |||
54 | 41 | public function getReference(): string |
|
55 | { |
||
56 | 41 | return "Working Volume {$this->width}x{$this->length}x{$this->depth}"; |
|
57 | } |
||
58 | |||
59 | 1 | public function getOuterWidth(): int |
|
60 | { |
||
61 | 1 | return $this->width; |
|
62 | } |
||
63 | |||
64 | 1 | public function getOuterLength(): int |
|
67 | } |
||
68 | |||
69 | 1 | public function getOuterDepth(): int |
|
70 | { |
||
71 | 1 | return $this->depth; |
|
72 | } |
||
73 | |||
74 | 41 | public function getEmptyWeight(): int |
|
77 | } |
||
78 | |||
79 | 41 | public function getInnerWidth(): int |
|
80 | { |
||
81 | 41 | return $this->width; |
|
82 | } |
||
83 | |||
84 | 41 | public function getInnerLength(): int |
|
85 | { |
||
86 | 41 | return $this->length; |
|
87 | } |
||
88 | |||
89 | 41 | public function getInnerDepth(): int |
|
92 | } |
||
93 | |||
94 | 41 | public function getMaxWeight(): int |
|
95 | { |
||
96 | 41 | return $this->maxWeight; |
|
97 | } |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | 1 | public function jsonSerialize(): array |
|
110 | ]; |
||
111 | } |
||
112 | } |
||
113 |