Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
5 | class JsonResponse |
||
6 | { |
||
7 | private $errcode = -123456789; |
||
8 | private $message = ''; |
||
9 | private $parms = array(); |
||
|
|||
10 | |||
11 | 2 | public function __construct($errcode, $message, $parms = null) |
|
12 | { |
||
13 | 2 | $this->errcode = $errcode; |
|
14 | 2 | $this->message = $message; |
|
15 | 2 | if ($parms) { |
|
16 | $this->parms = $parms; |
||
17 | } |
||
18 | 2 | } |
|
19 | |||
20 | public function __toString() |
||
21 | { |
||
22 | return $this->getEncodedResponse(); |
||
23 | } |
||
24 | |||
25 | 2 | public function getEncodedResponse() |
|
28 | } |
||
29 | |||
30 | 2 | public function getArrayResponse() |
|
33 | } |
||
34 | } |
||
35 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.