MandateEventHandlerJob   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
namespace GoCardlessPayment\Jobs\WebhookHandlers;
4
5
use GoCardlessPayment\Actions\Imports\ImportMandateAction;
6
use GoCardlessPayment\Events\GoCardlessWebhookEventHandled;
7
8
/**
9
 * General handler for all mandate related events.
10
 */
11
class MandateEventHandlerJob extends WebhookEventHandlerJob
12
{
13 3
    public function handle(): void
14
    {
15 3
        $mandateId = $this->event->links->mandate;
16
17 3
        $model = ImportMandateAction::make($mandateId)->execute();
18
19 2
        GoCardlessWebhookEventHandled::dispatch($this->event, $model);
20
    }
21
}
22