Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
41 | public function payloadConfig(): array |
||
42 | { |
||
43 | $payload = [ |
||
44 | 'description' => $this->description, |
||
45 | 'quantity' => $this->quantity, |
||
46 | 'total_price' => $this->totalPrice, |
||
47 | ]; |
||
48 | if ($this->unitPrice) { |
||
49 | $payload['unit_price'] = $this->unitPrice; |
||
50 | } |
||
51 | return $payload; |
||
52 | } |
||
54 |