Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
21 | 46 | public function __invoke(): Closure |
|
22 | { |
||
23 | /** @var Closure(iterable<TKey, T>): Generator<TKey, T> $pipe */ |
||
24 | 46 | $pipe = (new Pipe())()( |
|
25 | 46 | (new Reverse())(), |
|
26 | // We could use `Head` here, but I use `Limit` for minor perf boost. |
||
27 | 46 | (new Limit())()(1)(0) |
|
28 | 46 | ); |
|
29 | |||
30 | // Point free style. |
||
31 | 46 | return $pipe; |
|
32 | } |
||
34 |