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 ( 9dc691...a1e10d )
by Benjamin
02:44
created

ParamCollection   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 69.23%

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
ccs 9
cts 13
cp 0.6923
wmc 7

6 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 3 1
A set() 0 3 1
A __construct() 0 3 1
A keys() 0 3 1
A has() 0 3 1
A get() 0 3 2
1
<?php
2
3
namespace App\Lib\Http;
4
5
class ParamCollection
6
{
7
    protected $parameters;
8
9 4
    public function __construct(array $params = array())
10
    {
11 4
        $this->parameters = $params;
12 4
    }
13
14 4
    public function all()
15
    {
16 4
        return $this->parameters;
17
    }
18
19
    public function keys()
20
    {
21
        return array_keys($this->parameters);
22
    }
23
24 1
    public function get($key, $default = null)
25
    {
26 1
        return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default;
27
    }
28
29 4
    public function has($key)
30
    {
31 4
        return array_key_exists($key, $this->parameters);
32
    }
33
34
    public function set($key, $value)
35
    {
36
        $this->parameters[$key] = $value;
37
    }
38
}
39