Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 35.7% |
Changes | 0 |
1 | <?php |
||
11 | class Fixed implements DiscountTypeInterface |
||
12 | { |
||
13 | /** |
||
14 | * @JMS\Type("Price") |
||
15 | * @var Price |
||
16 | */ |
||
17 | private $discount; |
||
18 | |||
19 | /** |
||
20 | * Percentage constructor. |
||
21 | * @param $discount |
||
22 | */ |
||
23 | 2 | public function __construct(Price $discount) |
|
26 | 2 | } |
|
27 | |||
28 | 2 | public function apply(Basket $to): Price |
|
29 | { |
||
30 | 2 | return $this->discount; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return Price |
||
35 | */ |
||
36 | public function getDiscount(): Price |
||
39 | } |
||
40 | |||
41 | public static function fromArray(array $data, Configuration $configuration): DiscountTypeInterface |
||
54 |