UpdatePaymentModelsFromResponse::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 8
rs 10
1
<?php
2
3
namespace ByTIC\Payments\Actions\GatewayNotifications;
4
5
/**
6
 * Class UpdatePaymentModelsFromResponse
7
 * @package ByTIC\Payments\Actions
8
 * @internal
9
 */
10
class UpdatePaymentModelsFromResponse
11
{
12
    /**
13
     * @param $response
14
     * @param $model
15
     * @param string $type
16
     */
17
    public static function handle($response, $model, $type)
18
    {
19
        $notification = new NotificationData($type, $response, $model);
20
21
        CreateSessionFromResponse::handle($notification);
22
        CreateOrUpdateTokenFromResponse::handle($notification);
23
        CreateOrUpdateTransactionFromResponse::handle($notification);
24
        UpdateSubscriptionFromResponse::handle($notification);
25
    }
26
}
27