| Total Complexity | 11 |
| Total Lines | 91 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class WorkingVolume implements Box, JsonSerializable |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | private $width; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var int |
||
| 27 | */ |
||
| 28 | private $length; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var int |
||
| 32 | */ |
||
| 33 | private $depth; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var int |
||
| 37 | */ |
||
| 38 | private $maxWeight; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Constructor. |
||
| 42 | */ |
||
| 43 | 23 | public function __construct( |
|
| 44 | int $width, |
||
| 45 | int $length, |
||
| 46 | int $depth, |
||
| 47 | int $maxWeight |
||
| 48 | ) { |
||
| 49 | 23 | $this->width = $width; |
|
| 50 | 23 | $this->length = $length; |
|
| 51 | 23 | $this->depth = $depth; |
|
| 52 | 23 | $this->maxWeight = $maxWeight; |
|
| 53 | 23 | } |
|
| 54 | |||
| 55 | 22 | public function getReference(): string |
|
| 56 | { |
||
| 57 | 22 | return "Working Volume {$this->width}x{$this->length}x{$this->depth}"; |
|
| 58 | } |
||
| 59 | |||
| 60 | 1 | public function getOuterWidth(): int |
|
| 61 | { |
||
| 62 | 1 | return $this->width; |
|
| 63 | } |
||
| 64 | |||
| 65 | 1 | public function getOuterLength(): int |
|
| 68 | } |
||
| 69 | |||
| 70 | 1 | public function getOuterDepth(): int |
|
| 71 | { |
||
| 72 | 1 | return $this->depth; |
|
| 73 | } |
||
| 74 | |||
| 75 | 22 | public function getEmptyWeight(): int |
|
| 78 | } |
||
| 79 | |||
| 80 | 22 | public function getInnerWidth(): int |
|
| 81 | { |
||
| 82 | 22 | return $this->width; |
|
| 83 | } |
||
| 84 | |||
| 85 | 22 | public function getInnerLength(): int |
|
| 86 | { |
||
| 87 | 22 | return $this->length; |
|
| 88 | } |
||
| 89 | |||
| 90 | 22 | public function getInnerDepth(): int |
|
| 93 | } |
||
| 94 | |||
| 95 | 22 | public function getMaxWeight(): int |
|
| 96 | { |
||
| 97 | 22 | return $this->maxWeight; |
|
| 98 | } |
||
| 99 | |||
| 100 | 1 | #[ReturnTypeWillChange] |
|
| 109 | ]; |
||
| 110 | } |
||
| 111 | } |
||
| 112 |