AbstractGateway   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 6 1
A getDefaultParameters() 0 6 1
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-onepay
4
 *
5
 * @copyright (c) PHP Viet
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace Omnipay\OnePay;
10
11
use Omnipay\Common\AbstractGateway as BaseAbstractGateway;
12
13
/**
14
 * @author Vuong Minh <[email protected]>
15
 * @since 1.0.0
16
 */
17
abstract class AbstractGateway extends BaseAbstractGateway
18
{
19
    use Concerns\Parameters;
20
    use Concerns\ParametersNormalization;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function initialize(array $parameters = [])
26
    {
27
        return parent::initialize(
28
            $this->normalizeParameters($parameters)
29
        );
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function getDefaultParameters(): array
36
    {
37
        return [
38
            'vpc_Version' => 2,
39
        ];
40
    }
41
}
42