Total Complexity | 2 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class InvoiceServiceItem implements \JsonSerializable |
||
10 | { |
||
11 | private string $name; |
||
12 | |||
13 | /** @var float|int|string */ |
||
14 | private $amount; |
||
15 | |||
16 | /** @var float|int */ |
||
17 | private $quantity; |
||
18 | |||
19 | private ?int $serviceNumber; |
||
20 | |||
21 | /** |
||
22 | * @param float|int|string $amount |
||
23 | * @param float|int $quantity |
||
24 | * @param mixed $serviceNumber |
||
25 | */ |
||
26 | public function __construct(string $name, $amount, $quantity, $serviceNumber = 0) |
||
27 | { |
||
28 | $this->name = $name; |
||
29 | $this->amount = $amount; |
||
30 | $this->quantity = $quantity; |
||
31 | $this->serviceNumber = $serviceNumber; |
||
32 | } |
||
33 | |||
34 | public function jsonSerialize(): array |
||
42 | } |
||
43 | } |
||
44 |