Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
23 | public function __construct( |
||
24 | string $description, |
||
25 | int $quantity, |
||
26 | float $totalPrice, |
||
27 | float $unitPrice = null |
||
28 | ) { |
||
29 | |||
30 | $this->description = $description; |
||
31 | $this->quantity = $quantity; |
||
32 | $this->totalPrice = round($totalPrice, 2); |
||
33 | $this->unitPrice = round($unitPrice, 2); |
||
34 | } |
||
54 |