Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function init() |
||
19 | { |
||
20 | $this->tokens = array_merge($this->tokens, array_merge([ |
||
|
|||
21 | '{relationship}' => '<name:\w+>' |
||
22 | ])); |
||
23 | $this->patterns = array_merge($this->patterns, [ |
||
24 | 'DELETE {id}/relationships/{relationship}' => 'delete-relationship', |
||
25 | 'POST,PATCH {id}/relationships/{relationship}' => 'update-relationship', |
||
26 | 'GET {id}/{relationship}' => 'view-related', |
||
27 | '{id}/{relationship}' => 'options' |
||
28 | ]); |
||
29 | parent::init(); |
||
30 | } |
||
32 | } |
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.