| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function vote_add($id, Request $request) |
||
| 41 | { |
||
| 42 | $lv = new LogoVote(); |
||
|
|
|||
| 43 | $lv->logo_id = $id; |
||
| 44 | $lv->user_id = \Auth::id(); |
||
| 45 | if ($request->get('value') == 0) { |
||
| 46 | $lv->down = 1; |
||
| 47 | $lv->up = 0; |
||
| 48 | } else { |
||
| 49 | $lv->down = 0; |
||
| 50 | $lv->up = 1; |
||
| 51 | } |
||
| 52 | |||
| 53 | $lv->save(); |
||
| 54 | |||
| 55 | event(new Obyx('logo-vote', \Auth::id())); |
||
| 56 | |||
| 57 | return \Redirect::back(); |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
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.