GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#88)
by Lucien
06:51 queued 51s
created

EcommercePaymentRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 47.06%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 40
ccs 8
cts 17
cp 0.4706
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValidOgoneUris() 0 4 1
A setAlias() 0 6 1
A getRequiredFields() 0 6 1
A getValidOperations() 0 8 1
1
<?php
2
/*
3
 * This file is part of the Marlon Ogone package.
4
 *
5
 * (c) Marlon BVBA <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Ogone\Ecommerce;
12
13
use Ogone\AbstractPaymentRequest;
14
use Ogone\DirectLink\PaymentOperation;
15
use Ogone\ShaComposer\ShaComposer;
16
17
class EcommercePaymentRequest extends AbstractPaymentRequest
18
{
19
20
    const TEST = "https://secure.ogone.com/ncol/test/orderstandard_utf8.asp";
21
    const PRODUCTION = "https://secure.ogone.com/ncol/prod/orderstandard_utf8.asp";
22
23 54
    public function __construct(ShaComposer $shaComposer)
24
    {
25 54
        $this->shaComposer = $shaComposer;
26 54
        $this->ogoneUri = self::TEST;
27 54
    }
28
29 7
    public function getRequiredFields()
30
    {
31
        return array(
32 7
            'pspid', 'currency', 'amount', 'orderid'
33
        );
34
    }
35
36 6
    public function getValidOgoneUris()
37
    {
38 6
        return array(self::TEST, self::PRODUCTION);
39
    }
40
41
    public function setAlias(Alias $alias)
42
    {
43
        $this->parameters['aliasOperation'] = $alias->getAliasOperation();
44
        $this->parameters['aliasusage'] = $alias->getAliasUsage();
45
        $this->parameters['alias'] = $alias->getAlias();
46
    }
47
48
    protected function getValidOperations()
49
    {
50
        return array(
51
            PaymentOperation::REQUEST_FOR_AUTHORISATION,
52
            PaymentOperation::REQUEST_FOR_DIRECT_SALE,
53
            PaymentOperation::REQUEST_FOR_PRE_AUTHORISATION,
54
        );
55
    }
56
}
57