Conditions | 5 |
Paths | 10 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
17 | public function rewind() |
||
18 | 1 | { |
|
19 | $shuffledIterator = new \ArrayIterator(); |
||
20 | 1 | $items = []; |
|
21 | 1 | foreach ($this->innerIterator as $key => $value) { |
|
22 | 1 | $items[] = $this->generateElement($key, $value, $this->innerIterator); |
|
23 | 1 | $this->min = $this->min < $value ? $this->min : $value; |
|
24 | 1 | $this->max = $this->max > $value ? $this->max : $value; |
|
25 | 1 | } |
|
26 | |||
27 | shuffle($items); |
||
28 | 1 | ||
29 | foreach ($items as $data) { |
||
30 | 1 | $shuffledIterator[$data->key] = $data->current; |
|
31 | 1 | } |
|
32 | $this->setInnerIterator($shuffledIterator); |
||
33 | 1 | } |
|
34 | |||
70 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.