| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 4 | public function __invoke(): Closure |
|
| 22 | { |
||
| 23 | /** @var Closure(iterable<TKey, T>): Generator<int, float> $pipe */ |
||
| 24 | 4 | $pipe = (new Pipe())()( |
|
| 25 | 4 | (new Normalize())(), |
|
| 26 | 4 | (new ScanLeft1())()( |
|
| 27 | 4 | static fn (float $acc, float $value, int $key): float => ($acc * $key + $value) / ($key + 1) |
|
| 28 | 4 | ) |
|
| 29 | 4 | ); |
|
| 30 | |||
| 31 | 4 | return $pipe; |
|
| 32 | } |
||
| 34 |