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
Push — master ( b2ba8c...ddb0ea )
by Jelte
02:26
created

DirectLinkMaintenanceRequest::getValidOperations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
ccs 9
cts 9
cp 1
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * @author Nicolas Clavaud <[email protected]>
4
 */
5
6
namespace Ogone\DirectLink;
7
8
use Ogone\AbstractDirectLinkRequest;
9
use Ogone\ShaComposer\ShaComposer;
10
use InvalidArgumentException;
11
12
class DirectLinkMaintenanceRequest extends AbstractDirectLinkRequest
13
{
14
15
    const TEST = "https://secure.ogone.com/ncol/test/maintenancedirect.asp";
16
    const PRODUCTION = "https://secure.ogone.com/ncol/prod/maintenancedirect.asp";
17
18 9
    public function __construct(ShaComposer $shaComposer)
19
    {
20 9
        $this->shaComposer = $shaComposer;
21 9
        $this->ogoneUri = self::TEST;
22 9
    }
23
24 4
    public function getRequiredFields()
25
    {
26
        return array(
27 4
            'pspid',
28 4
            'userid',
29 4
            'pswd',
30 4
            'operation',
31 4
        );
32
    }
33
34 2
    public function getValidOgoneUris()
35
    {
36 2
        return array(self::TEST, self::PRODUCTION);
37
    }
38
39 3
    public function setAmount($amount)
40
    {
41 3
        if (!is_int($amount)) {
42 2
            throw new InvalidArgumentException("Amount should be an integer");
43
        }
44
45 1
        $this->parameters['amount'] = $amount;
46 1
    }
47
48 4
    public function setOperation(MaintenanceOperation $operation)
49
    {
50 4
        $this->parameters['operation'] = (string) $operation;
51 4
    }
52
}
53