| 1 | <?php declare(strict_types=1); |
||
| 5 | abstract class Parameter |
||
| 6 | { |
||
| 7 | private $key; |
||
| 8 | |||
| 9 | private $type; |
||
| 10 | |||
| 11 | 221 | public function __construct(string $key, string $type = 'text/plain') |
|
| 12 | { |
||
| 13 | 221 | $this->key = $key; |
|
|
|
|||
| 14 | 221 | $this->type = $type; |
|
| 15 | } |
||
| 16 | |||
| 17 | 194 | public function getKey(): string |
|
| 21 | |||
| 22 | 2 | public function getType(): string |
|
| 26 | } |
||
| 27 |
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.