Total Complexity | 6 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
5 | class CartItem |
||
6 | { |
||
7 | |||
8 | /** @var string */ |
||
9 | private $name; |
||
10 | |||
11 | /** @var int */ |
||
12 | private $quantity; |
||
13 | |||
14 | /** @var int */ |
||
15 | private $amount; |
||
16 | |||
17 | /** @var string|null */ |
||
18 | private $description; |
||
19 | |||
20 | 4 | public function __construct(string $name, int $quantity, int $amount, ?string $description = null) |
|
32 | 3 | } |
|
33 | |||
34 | 1 | public function getName(): string |
|
35 | { |
||
36 | 1 | return $this->name; |
|
37 | } |
||
38 | |||
39 | 1 | public function getQuantity(): int |
|
40 | { |
||
41 | 1 | return $this->quantity; |
|
42 | } |
||
43 | |||
44 | 1 | public function getAmount(): int |
|
47 | } |
||
48 | |||
49 | 2 | public function getDescription(): ?string |
|
55 |