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 ( 84bb15...86ae46 )
by Benjamin
05:01
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
ccs 9
cts 13
cp 0.6923
rs 10
c 0
b 0
f 0
wmc 7

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A all() 0 3 1
A keys() 0 3 1
A get() 0 3 2
A has() 0 3 1
A set() 0 3 1
1
<?php
2
3
namespace 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