| Total Complexity | 7 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class InvoiceController |
||
| 16 | { |
||
| 17 | use DocBlockResolverAwareTrait; |
||
| 18 | |||
| 19 | public function __construct( |
||
| 20 | private Request $request, |
||
| 21 | ) { |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @psalm-suppress InternalMethod |
||
| 26 | */ |
||
| 27 | public function __invoke(string $username = '', int $amount = 0): string |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | private function json(array $json): string |
||
| 49 | { |
||
| 50 | return json_encode($json, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT); |
||
| 51 | } |
||
| 52 | |||
| 53 | private function error(Throwable $e): string |
||
| 58 | ]); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |