Passed
Push — master ( 8ed01e...08cfff )
by Romain
02:40
created

PriceList   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 36
ccs 7
cts 7
cp 1
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 2
    public function __construct(string $label, string $amount)
25
    {
26 2
        $this->label = $label;
27 2
        $this->amount = $amount;
28 2
    }
29
30
    /**
31
     * @return array
32
     */
33 1
    public function jsonSerialize(): array
34
    {
35
        return [
36 1
            'label' => $this->label,
37 1
            'amount' => $this->amount,
38
        ];
39
    }
40
}
41