AbstractSignatureRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 12 1
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-onepay
4
 * @copyright (c) PHP Viet
5
 * @license [MIT](http://www.opensource.org/licenses/MIT)
6
 */
7
8
namespace Omnipay\OnePay\Message;
9
10
/**
11
 * @author Vuong Minh <[email protected]>
12
 * @since 1.0.0
13
 */
14
abstract class AbstractSignatureRequest extends AbstractRequest
15
{
16
    use Concerns\RequestEndpoint;
17
    use Concerns\RequestSignature;
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getData(): array
23
    {
24
        $parameters = $this->getParameters();
25
        call_user_func_array(
26
            [$this, 'validate'],
27
            $this->getSignatureParameters()
28
        );
29
        $parameters['vpc_SecureHash'] = $this->generateSignature();
30
        unset($parameters['vpc_HashKey'], $parameters['testMode']);
31
32
        return $parameters;
33
    }
34
}
35