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