RequestGeneric   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 9
c 1
b 0
f 0
dl 0
loc 42
ccs 0
cts 18
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setParams() 0 3 1
A getId() 0 7 2
A getParams() 0 3 1
A setId() 0 3 1
1
<?php
2
3
namespace Graze\WipotecCheckweigherClient\Request;
4
5
use Exception;
6
7
class RequestGeneric extends AbstractRequest
8
{
9
    /** @var string */
10
    private $id;
11
12
    /** @var mixed[] */
13
    private $params = [];
14
15
    /**
16
     * @param string $id
17
     */
18
    public function setId($id)
19
    {
20
        $this->id = $id;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getId()
27
    {
28
        if (!$this->id) {
29
            throw new Exception('Id has not been set');
30
        }
31
32
        return $this->id;
33
    }
34
35
    /**
36
     * @param mixed[] $params
37
     */
38
    public function setParams(array $params)
39
    {
40
        $this->params = $params;
41
    }
42
43
    /**
44
     * @return mixed[]
45
     */
46
    public function getParams()
47
    {
48
        return $this->params;
49
    }
50
}
51