Test Failed
Push — master ( 5a72fc...745ae1 )
by Mehmet
03:27
created

Session::sessionExtend()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace MerchantSafeUnipay\SDK\Action;
5
6
use MerchantSafeUnipay;
7
8
class Session extends ActionAbstract implements ActionInterface
9
{
10
11
    public function sessionToken($args)
12
    {
13
        $this->action = 'SESSIONTOKEN';
14
        $queryParamKeys = [
15
            'CUSTOMER', 'SESSIONTYPE', 'RETURNURL', 'MERCHANTPAYMENTID', 'AMOUNT', 'CURRENCY', 'CUSTOMEREMAIL',
16
            'CUSTOMERNAME', 'CUSTOMERPHONE', 'CUSTOMERIP', 'CUSTOMERUSERAGENT', 'SESSIONEXPIRY', 'LANGUAGE',
17
            'CAMPAIGNCODE', 'ORDERITEMS', 'TMXSESSIONQUERYINPUT', 'EXTRA', 'MAXINSTALLMENTCOUNT', 'SPLITPAYMENTTYPE'
18
        ];
19
        $args = MerchantSafeUnipay\filter($queryParamKeys, $args);
20
        $this->queryParameters = $args;
21
    }
22
23
24
    public function sessionExtend($args)
25
    {
26
        $this->action = 'SESSIONTOKEN';
27
        $queryParamKeys = [
28
            'SESSIONTOKEN', 'TOKEN', 'SESSIONEXPIRY'
29
        ];
30
        $args = MerchantSafeUnipay\filter($queryParamKeys, $args);
31
        $this->queryParameters = $args;
32
    }
33
}
34