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 |
use Pinq\Iterators\Common; |
|
6 |
|
|
7 |
/**
|
|
8 |
* Implementation of the join iterator using generators. |
|
9 |
* |
|
10 |
* @author Elliot Levin <elliotlevin@hotmail.com> |
|
11 |
*/ |
|
12 |
class JoinOnIterator extends JoinIterator |
|
13 |
{ |
|
14 |
use Common\JoinOnIterator; |
|
15 |
|
|
16 |
public function __construct(IGenerator $outerIterator, IGenerator $innerIterator, callable $filter) |
|
17 |
{ |
× |
18 |
parent::__construct($outerIterator, $innerIterator); |
68 all except 329.3 ✔ |
19 |
self::__constructJoinOnIterator($filter); |
68 all except 329.3 ✔ |
20 |
} |
68 all except 329.3 ✔ |
21 |
|
|
22 |
protected function innerGenerator($outerKey, $outerValue) |
|
23 |
{ |
× |
24 |
$innerValues = new OrderedMap($this->innerIterator); |
60 all except 329.3 ✔ |
25 |
|
|
26 |
return $this->defaultIterator( |
60 all except 329.3 ✔ |
27 |
new FilterIterator( |
60 all except 329.3 ✔ |
28 |
$innerValues,
|
60 all except 329.3 ✔ |
29 |
$this->innerElementFilter($outerKey, $outerValue)) |
60 all except 329.3 ✔ |
30 |
); |
60 all except 329.3 ✔ |
31 |
} |
× |
32 |
} |