Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
26 | 3 | protected function applyDiscount(): void |
|
27 | { |
||
28 | 3 | $this->priceAfterDiscount = $this->price; |
|
29 | |||
30 | 3 | if ($this->price->greaterThanOrEqual($this->getTreshold($this->currency))) { |
|
31 | 2 | $this->priceAfterDiscount = $this->price->subtract($this->price->multiply($this->discount)); |
|
32 | } |
||
33 | 3 | } |
|
34 | |||
42 |