Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
26 | 3 | public function __construct(string $description, CartInterface $cart, array $config = []) |
|
27 | { |
||
28 | 3 | $this->description = $description; |
|
29 | 3 | $this->price = $cart->totalAfterDiscounts(); |
|
30 | 3 | $this->currency = $cart->getCurrency(); |
|
31 | |||
32 | 3 | foreach ($config as $property => $value) { |
|
33 | 3 | $this->$property = $value; |
|
34 | } |
||
35 | |||
36 | 3 | $this->applyDiscount(); |
|
37 | 3 | } |
|
38 | |||
51 |