Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | protected function trkSummary(array $input, array &$output) : void |
||
18 | { |
||
19 | if (empty($output)) { |
||
20 | $output = $input; |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | $output['count'] += $input['count']; |
||
25 | $output['sum'] += $input['sum']; |
||
26 | |||
27 | foreach ($input['quantiles'] as $idx => $quantile) { |
||
28 | $old = &$output['quantiles'][$idx][1]; |
||
29 | $new = $quantile[1]; |
||
30 | $old = ($old + $new) / 2; |
||
31 | } |
||
34 |