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 (#85)
by Jelte
04:17
created

EcommercePaymentRequest::getValidOperations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 2
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
crap 2
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