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

AbstractDirectLinkRequest::setPassword()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
/*
3
 * @author Nicolas Clavaud <[email protected]>
4
 */
5
6
namespace Ogone;
7
8
use InvalidArgumentException;
9
10
abstract class AbstractDirectLinkRequest extends AbstractRequest
11
{
12
13 9
    public function setUserId($userid)
14
    {
15 9
        if (strlen($userid) < 2) {
16 2
            throw new InvalidArgumentException("User ID is too short");
17
        }
18 7
        $this->parameters['userid'] = $userid;
19 7
    }
20
21 9
    public function setPassword($password)
22
    {
23 9
        if (strlen($password) < 8) {
24 2
            throw new InvalidArgumentException("Password is too short");
25
        }
26 7
        $this->parameters['pswd'] = $password;
27 7
    }
28
29 7
    public function setPayId($payid)
30
    {
31 7
        $this->parameters['payid'] = $payid;
32 7
    }
33
34
    public function setOrderId($orderid)
35
    {
36
        $this->parameters['orderid'] = $orderid;
37
    }
38
39 2
    protected function getRequiredFieldGroups()
40
    {
41
        return array(
42 2
            array('payid', 'orderid'),
43
        );
44
    }
45
}
46