| Conditions | 2 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 2 | public function getIterator() |
|
| 27 | { |
||
| 28 | 2 | $groupedEvents = $this->fetchCommits(); |
|
| 29 | |||
| 30 | 2 | $deGrouper = new IteratorExpander(function ($group) { |
|
| 31 | 2 | foreach ($group as $event) { |
|
| 32 | 2 | yield $event; |
|
| 33 | } |
||
| 34 | 2 | }); |
|
| 35 | |||
| 36 | 2 | $events = iterator_to_array($deGrouper($groupedEvents)); |
|
| 37 | |||
| 38 | 2 | return new \ArrayIterator($events); |
|
| 39 | } |
||
| 40 | |||
| 77 | } |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: