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::has()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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