| 1 | <?php |
||
| 13 | class FileAwareException extends \RuntimeException |
||
| 14 | { |
||
| 15 | private $lineNumber; |
||
| 16 | private $filePath; |
||
| 17 | |||
| 18 | 11 | public function __construct($message = '', $code = 0, \Exception $previous = null, $path = '', $line = -1) |
|
| 25 | |||
| 26 | public function getLineNumber() |
||
| 30 | |||
| 31 | public function getPath() |
||
| 35 | |||
| 36 | 1 | public static function castException(\Exception $e, $filePath) |
|
| 50 | } |
||
| 51 |
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.