Completed
Pull Request — master (#53)
by Romain
03:15
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
3
namespace Kerox\Messenger\Model\Common\Button\Payment;
4
5
class PriceList implements \JsonSerializable
6
{
7
8
    /**
9
     * @var string
10
     */
11
    protected $label;
12
13
    /**
14
     * @var string
15
     */
16
    protected $amount;
17
18
    /**
19
     * PriceList constructor.
20
     *
21
     * @param string $label
22
     * @param string $amount
23
     */
24
    public function __construct(string $label, string $amount)
25
    {
26
        $this->label = $label;
27
        $this->amount = $amount;
28
    }
29
30
    /**
31
     * @return array
32
     */
33
    public function jsonSerialize(): array
34
    {
35
        return [
36
            'label' => $this->label,
37
            'amount' => $this->amount,
38
        ];
39
    }
40
}
41