| Total Complexity | 9 |
| Total Lines | 142 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class OrderItem { |
||
| 21 | /** |
||
| 22 | * Item id. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $id; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Item name (required). |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private $name; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Description. |
||
| 37 | * |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | private $description; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Quantity (required). |
||
| 44 | * |
||
| 45 | * @var int |
||
| 46 | */ |
||
| 47 | private $quantity; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Amount (required). |
||
| 51 | * |
||
| 52 | * @var Money |
||
| 53 | */ |
||
| 54 | private $amount; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Tax. |
||
| 58 | * |
||
| 59 | * @var Money |
||
| 60 | */ |
||
| 61 | private $tax; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Category; physical or digital (required). |
||
| 65 | * |
||
| 66 | * @var string |
||
| 67 | */ |
||
| 68 | private $category; |
||
| 69 | |||
| 70 | /** |
||
| 71 | * VAT category. |
||
| 72 | * |
||
| 73 | * @var int |
||
| 74 | */ |
||
| 75 | private $vat_category; |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Construct order result. |
||
| 79 | * |
||
| 80 | * @param string $name Name. |
||
| 81 | * @param int $quantity Quantity. |
||
| 82 | * @param Money $amount Amount. |
||
| 83 | * @param string $category Category. |
||
| 84 | */ |
||
| 85 | public function __construct( $name, $quantity, Money $amount, $category ) { |
||
| 86 | $this->name = $name; |
||
| 87 | $this->quantity = $quantity; |
||
| 88 | $this->amount = $amount; |
||
| 89 | $this->category = $category; |
||
| 90 | } |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Get item ID. |
||
| 94 | * |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | public function get_id() { |
||
| 98 | return $this->id; |
||
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Get item name. |
||
| 103 | * |
||
| 104 | * @return string |
||
| 105 | */ |
||
| 106 | public function get_name() { |
||
| 107 | return $this->name; |
||
| 108 | } |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Get item description. |
||
| 112 | * |
||
| 113 | * @return int|string |
||
| 114 | */ |
||
| 115 | public function get_description() { |
||
| 116 | return $this->description; |
||
| 117 | } |
||
| 118 | |||
| 119 | /** |
||
| 120 | * Get quantity. |
||
| 121 | * |
||
| 122 | * @return int |
||
| 123 | */ |
||
| 124 | public function get_quantity() { |
||
| 125 | return $this->quantity; |
||
| 126 | } |
||
| 127 | |||
| 128 | /** |
||
| 129 | * Get amount. |
||
| 130 | * |
||
| 131 | * @return Money |
||
| 132 | */ |
||
| 133 | public function get_amount() { |
||
| 134 | return $this->amount; |
||
| 135 | } |
||
| 136 | |||
| 137 | /** |
||
| 138 | * Get tax. |
||
| 139 | * |
||
| 140 | * @return Money |
||
| 141 | */ |
||
| 142 | public function get_tax() { |
||
| 143 | return $this->tax; |
||
| 144 | } |
||
| 145 | |||
| 146 | /** |
||
| 147 | * Get category. |
||
| 148 | * |
||
| 149 | * @return string |
||
| 150 | */ |
||
| 151 | public function get_category() { |
||
| 153 | } |
||
| 154 | |||
| 155 | /** |
||
| 156 | * Get VAT category. |
||
| 157 | * |
||
| 158 | * @return int |
||
| 159 | */ |
||
| 160 | public function get_vat_category() { |
||
| 162 | } |
||
| 163 | } |
||
| 164 |