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

PriceList   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A jsonSerialize() 0 7 1
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