| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class LabeledPrice |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Portion label |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $label; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of |
||
| 24 | * US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the |
||
| 25 | * decimal point for each currency (2 for the majority of currencies). |
||
| 26 | * |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | private $amount; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getLabel(): string |
||
| 35 | { |
||
| 36 | return $this->label; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $label |
||
| 41 | */ |
||
| 42 | public function setLabel(string $label): void |
||
| 43 | { |
||
| 44 | $this->label = $label; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public function getAmount(): int |
||
| 51 | { |
||
| 52 | return $this->amount; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param int $amount |
||
| 57 | */ |
||
| 58 | public function setAmount(int $amount): void |
||
| 61 | } |
||
| 62 | |||
| 63 | } |