| 1 | <?php |
||
| 6 | class Payload implements PayloadInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var integer |
||
| 10 | */ |
||
| 11 | private $status; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | private $input; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $output; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | private $messages; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritDoc |
||
| 30 | */ |
||
| 31 | 7 | public function withStatus($code) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @inheritDoc |
||
| 41 | */ |
||
| 42 | 7 | public function getStatus() |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | */ |
||
| 50 | 1 | public function withInput(array $input) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @inheritDoc |
||
| 60 | */ |
||
| 61 | 1 | public function getInput() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @inheritDoc |
||
| 68 | */ |
||
| 69 | 5 | public function withOutput(array $output) |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @inheritDoc |
||
| 79 | */ |
||
| 80 | 6 | public function getOutput() |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @inheritDoc |
||
| 87 | */ |
||
| 88 | 2 | public function withMessages(array $messages) |
|
| 95 | |||
| 96 | /** |
||
| 97 | * @inheritDoc |
||
| 98 | */ |
||
| 99 | 4 | public function getMessages() |
|
| 103 | } |
||
| 104 |
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.