| Total Complexity | 12 |
| Total Lines | 133 |
| Duplicated Lines | 0 % |
| Coverage | 93.75% |
| 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 | 1 | public function getReference() |
|
| 61 | { |
||
| 62 | 1 | return 'Working Volume'; |
|
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return int |
||
| 67 | */ |
||
| 68 | 1 | public function getOuterWidth() |
|
| 69 | { |
||
| 70 | 1 | return $this->width; |
|
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return int |
||
| 75 | */ |
||
| 76 | 1 | public function getOuterLength() |
|
| 77 | { |
||
| 78 | 1 | return $this->length; |
|
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return int |
||
| 83 | */ |
||
| 84 | 1 | public function getOuterDepth() |
|
| 85 | { |
||
| 86 | 1 | return $this->depth; |
|
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @return int |
||
| 91 | */ |
||
| 92 | 1 | public function getEmptyWeight() |
|
| 93 | { |
||
| 94 | 1 | return 0; |
|
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return int |
||
| 99 | */ |
||
| 100 | 1 | public function getInnerWidth() |
|
| 101 | { |
||
| 102 | 1 | return $this->width; |
|
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return int |
||
| 107 | */ |
||
| 108 | 1 | public function getInnerLength() |
|
| 109 | { |
||
| 110 | 1 | return $this->length; |
|
| 111 | } |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @return int |
||
| 115 | */ |
||
| 116 | 1 | public function getInnerDepth() |
|
| 117 | { |
||
| 118 | 1 | return $this->depth; |
|
| 119 | } |
||
| 120 | |||
| 121 | /** |
||
| 122 | * @return int |
||
| 123 | */ |
||
| 124 | 1 | public function getMaxWeight() |
|
| 125 | { |
||
| 126 | 1 | return $this->maxWeight; |
|
| 127 | } |
||
| 128 | |||
| 129 | /** |
||
| 130 | * @return int |
||
| 131 | */ |
||
| 132 | public function getInnerVolume() |
||
| 135 | } |
||
| 136 | |||
| 137 | /** |
||
| 138 | * {@inheritdoc} |
||
| 139 | */ |
||
| 140 | 1 | public function jsonSerialize() |
|
| 141 | { |
||
| 142 | return [ |
||
| 143 | 1 | 'reference' => $this->getReference(), |
|
| 148 | ]; |
||
| 149 | } |
||
| 150 | } |
||
| 151 |