Conditions | 5 |
Paths | 10 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function getShuffledIterator($iterator) |
||
16 | { |
||
17 | $sortedIterator = new \ArrayIterator(); |
||
18 | $sorted = []; |
||
19 | foreach ($iterator as $key => $value) { |
||
20 | $sorted[] = $this->generateElement($key, $value, $iterator); |
||
21 | $this->min = $this->min < $value ? $this->min : $value; |
||
22 | $this->max = $this->max > $value ? $this->max : $value; |
||
23 | } |
||
24 | |||
25 | shuffle($sorted); |
||
26 | |||
27 | foreach ($sorted as $data) { |
||
28 | $sortedIterator->append($data); |
||
29 | } |
||
30 | return $sortedIterator; |
||
31 | } |
||
32 | |||
75 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.