PaymentResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getRequiredParams() 0 21 1
1
<?php
2
3
namespace Eo\KeyClient\Payment;
4
5
use Eo\KeyClient\Exception\KeyClientException;
6
use Symfony\Component\HttpFoundation\Request;
7
8
/**
9
 * PaymentResponse
10
 */
11
class PaymentResponse extends AbstractPayment implements PaymentResponseInterface
12
{
13
    /**
14
     * Class constructor
15
     *
16
     * @param Request $request
17
     */
18
    public function __construct(Request $request = null)
19
    {
20
        if (is_null($request)) {
21
            $request = Request::createFromGlobals();
22
        }
23
24
        parent::__construct($request->query->all());
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function getRequiredParams()
31
    {
32
        return array(
33
            'session_id',
34
            'codAut',
35
            'alias',
36
            'orario',
37
            'data',
38
            'mac',
39
            'importo',
40
            '$BRAND',
41
            'cognome',
42
            'languageId',
43
            'divisa',
44
            'email',
45
            'esito',
46
            'codTrans',
47
            'nome',
48
            'messaggio'
49
        );
50
    }
51
}