PaymentPolicy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 6 1
A edit() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MerchantSafeUnipay\SDK\Action;
5
6
use MerchantSafeUnipay;
7
8
final class PaymentPolicy extends ActionAbstract implements ActionInterface
9
{
10
    static private $addKeys = [
11
        'PAYMENTSYSTEM', 'PPOLICY', 'CURRENCY', 'AMOUNTLIMIT'
12
    ];
13
    static private $editKeys = [
14
        'PAYMENTSYSTEM', 'PPOLICY', 'CURRENCY', 'AMOUNTLIMIT'
15
    ];
16
17
    public function add($args)
18
    {
19
        $this->action = 'PAYMENTPOLICYADD';
20
        $args = MerchantSafeUnipay\filter(self::$addKeys, $args);
21
        $this->queryParameters = array_merge($this->merchantParams, $args);
22
    }
23
24
    public function edit($args)
25
    {
26
        $this->action = 'PAYMENTPOLICYEDIT';
27
        $args = MerchantSafeUnipay\filter(self::$editKeys, $args);
28
        $this->queryParameters = array_merge($this->merchantParams, $args);
29
    }
30
}
31