push
travis-ci
7003 of 7671 relevant lines covered (91.29%)
419.83 hits per line
1 |
<?php
|
|
2 |
|
|
3 |
namespace Pinq\Iterators\Generators; |
|
4 |
|
|
5 |
/**
|
|
6 |
* Implementation of the reindexer iterator using generators. |
|
7 |
* |
|
8 |
* @author Elliot Levin <elliotlevin@hotmail.com> |
|
9 |
*/ |
|
10 |
class ReindexedIterator extends IteratorGenerator |
|
11 |
{ |
|
12 |
public function __construct(IGenerator $iterator) |
|
13 |
{ |
× |
14 |
parent::__construct($iterator); |
100 all except 329.3 ✔ |
15 |
} |
100 all except 329.3 ✔ |
16 |
|
|
17 |
protected function &iteratorGenerator(IGenerator $iterator) |
|
18 |
{ |
× |
19 |
foreach ($iterator as &$value) { |
92 all except 329.3 ✔ |
20 |
yield $value;
|
76 all except 329.3 ✔ |
21 |
} |
84 all except 329.3 ✔ |
22 |
} |
84 all except 329.3 ✔ |
23 |
} |