Conditions | 5 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public function fetchItems($limit = 0) |
||
56 | { |
||
57 | $max = min(Yii::app()->player->model->level, $this->fetchMax()); |
||
58 | |||
59 | $this->items = []; //reset |
||
60 | $added = 0; |
||
61 | for ($i=$max; $i>=0; $i--) { |
||
62 | $res = Yii::app()->redis->getClient()->get('help:' . $this->topic . ':'.$i); |
||
63 | if ($res) { |
||
64 | $this->items[$i] = $res; |
||
65 | $added++; |
||
66 | if ($limit>0 && $added>=$limit) { |
||
67 | break; |
||
68 | } |
||
69 | } |
||
70 | } |
||
71 | } |
||
72 | |||
80 |
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.