Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 9 | public function handle(Request $request): JsonResponse |
|
31 | { |
||
32 | /** @phpstan-ignore-next-line */ |
||
33 | 9 | $event = WebhookEvent::create($request->json()->all()); |
|
34 | |||
35 | 9 | event($event); |
|
36 | |||
37 | 9 | match ($event->EventData::class) { |
|
38 | 3 | TransactionPaymentCreated::class => event($event->EventData), |
|
39 | 3 | TransactionFailed::class => event($event->EventData), |
|
40 | 1 | default => null, |
|
41 | }; |
||
42 | |||
43 | 9 | return response()->json(); |
|
44 | } |
||
46 |