| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class PriceList implements \JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $label; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $amount; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * PriceList constructor. |
||
| 21 | * |
||
| 22 | * @param string $label |
||
| 23 | 2 | * @param string $amount |
|
| 24 | */ |
||
| 25 | 2 | public function __construct(string $label, string $amount) |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | 1 | * @param string $label |
|
| 33 | * @param string $amount |
||
| 34 | * |
||
| 35 | 1 | * @return \Kerox\Messenger\Model\Common\Button\Payment\PriceList |
|
| 36 | 1 | */ |
|
| 37 | public static function create(string $label, string $amount): self |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return array |
||
| 44 | */ |
||
| 45 | public function toArray(): array |
||
| 46 | { |
||
| 47 | return [ |
||
| 48 | 'label' => $this->label, |
||
| 49 | 'amount' => $this->amount, |
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public function jsonSerialize(): array |
||
| 59 | } |
||
| 60 | } |
||
| 61 |