| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function updateExtended() |
||
| 10 | { |
||
| 11 | //calculate |
||
| 12 | $limitItems = $this->minOwnedCount(); |
||
| 13 | $sumSkill = Yii::app()->player->model->skill; |
||
|
|
|||
| 14 | |||
| 15 | //get items limited |
||
| 16 | $sumSkill += $this->sumSkill($limitItems, false); |
||
| 17 | |||
| 18 | //get baits limited |
||
| 19 | $sumSkill += $this->sumSkill($limitItems, true); |
||
| 20 | if ($sumSkill < 1) { |
||
| 21 | $sumSkill = 1; //lowest value for player skill. |
||
| 22 | } |
||
| 23 | |||
| 24 | Yii::app()->player->model->rewriteAttributes(['skill_extended'=>$sumSkill]); |
||
| 25 | } |
||
| 26 | |||
| 79 |
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.