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   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 1
dl 0
loc 36
ccs 15
cts 18
cp 0.8333
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setPassword() 0 7 2
A setPayId() 0 4 1
A setOrderId() 0 4 1
A setUserId() 0 7 2
A getRequiredFieldGroups() 0 6 1
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