type = $type; $this->width = $width; $this->height = $height; $this->length = $length; $this->items = $items; } /** * @return int */ public function getType(): int { return $this->type; } /** * @return float */ public function getWidth(): float { return $this->width; } /** * @return float */ public function getHeight(): float { return $this->height; } /** * @return float */ public function getLength(): float { return $this->length; } /** * @return array */ public function getItems(): array { return array_map(function($item){ return new ItemObject($item['description'],$item['unitOfMeasurment'],$item['quantity'],$item['price'],$item['currency']); },$this->items); } }