Completed
Branch develop (8166a6)
by Romain
01:52
created

PriceList::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace Kerox\Messenger\Model\Common\Buttons\Payment;
3
4
class PriceList implements \JsonSerializable
5
{
6
7
    /**
8
     * @var string
9
     */
10
    protected $label;
11
12
    /**
13
     * @var string
14
     */
15
    protected $amount;
16
17
    /**
18
     * PriceList constructor.
19
     *
20
     * @param string $label
21
     * @param string $amount
22
     */
23
    public function __construct(string $label, string $amount)
24
    {
25
        $this->label = $label;
26
        $this->amount = $amount;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function jsonSerialize(): array
33
    {
34
        return [
35
            'label' => $this->label,
36
            'amount' => $this->amount,
37
        ];
38
    }
39
}
40