Test Setup Failed
Branch master (97a7ce)
by Anton
02:01
created

MockRequest::getGet()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AnaxMocks;
4
5
class MockRequest
6
{
7
    private $get;
8
9
    public function getGet($key = null, $default = null)
0 ignored issues
show
Unused Code introduced by
The parameter $default is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

9
    public function getGet($key = null, /** @scrutinizer ignore-unused */ $default = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
10
    {
11
        if (\array_key_exists($key, $this->get)) {
12
            return $this->get[$key];
13
        } else {
14
            return null;
15
        }
16
    }
17
18
    public function setGet($key, $value)
19
    {
20
        $this->get[$key] = $value;
21
    }
22
}
23