| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 4 | public function __invoke($collection, $iterator) |
|
| 20 | { |
||
| 21 | 4 | $collection = clone $collection; |
|
| 22 | |||
| 23 | 4 | $found = false; |
|
| 24 | 4 | foreach ($collection as $k => $v) { |
|
| 25 | 4 | if (call_user_func($iterator, $v, $k, $collection)) { |
|
| 26 | 4 | $found = true; |
|
| 27 | 4 | break; |
|
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | 4 | return $found; |
|
| 32 | } |
||
| 33 | } |
||
| 34 |