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 (#82)
by
unknown
03:34
created

Alias   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 29
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getAlias() 0 4 1
A setAlias() 0 4 1
A __toString() 0 4 1
1
<?php namespace Ogone\FlexCheckout;
2
3
use InvalidArgumentException;
4
5
class Alias
6
{
7
    /** @var string */
8
    private $alias;
9
10
    public function __construct($alias)
11
    {
12
        if (preg_match('/[^a-zA-Z0-9_-]/', $alias)) {
13
            throw new InvalidArgumentException("Alias cannot contain special characters");
14
        }
15
16
        $this->alias = $alias;
17
    }
18
19
    public function getAlias()
20
    {
21
        return $this->alias;
22
    }
23
24
    public function setAlias($alias)
25
    {
26
        $this->alias = $alias;
27
    }
28
29
    public function __toString()
30
    {
31
        return $this->alias;
32
    }
33
}
34