| Total Complexity | 8 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class CustomsDeclarationItem implements Arrayable |
||
| 11 | { |
||
| 12 | use DataAware; |
||
| 13 | |||
| 14 | public function __construct( |
||
| 15 | string $description, |
||
| 16 | int $quantity, |
||
| 17 | string $country, |
||
| 18 | string $tnvedCode, |
||
| 19 | int $value = null, |
||
| 20 | int $weight = null |
||
| 21 | ) { |
||
| 22 | $this->data['description'] = $description; |
||
| 23 | $this->data['amount'] = $quantity; |
||
| 24 | $this->data['country-code'] = $country; |
||
| 25 | $this->data['tnved-code'] = $tnvedCode; |
||
| 26 | $this->data['value'] = $value; |
||
| 27 | $this->data['weight'] = $weight; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getDescription(): ?string |
||
| 31 | { |
||
| 32 | return $this->get('description'); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getQuantity(): ?int |
||
| 36 | { |
||
| 37 | return $this->get('amount'); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getCountryCode(): ?int |
||
| 41 | { |
||
| 42 | return $this->get('country-code'); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getValue(): ?int |
||
| 46 | { |
||
| 47 | return $this->get('value'); |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getWeight(): ?int |
||
| 51 | { |
||
| 52 | return $this->get('weight'); |
||
| 53 | } |
||
| 54 | |||
| 55 | public function getTnvedCode(): ?string |
||
| 58 | } |
||
| 59 | |||
| 60 | public function toArray(): array |
||
| 61 | { |
||
| 62 | return $this->data; |
||
| 63 | } |
||
| 64 | } |
||
| 65 |