Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function data() : array |
||
17 | { |
||
18 | $s = ['count' => $this->count, 'sum' => $this->sum]; |
||
19 | |||
20 | foreach ($this->bounds as $idx => $bound) { |
||
21 | $s['buckets'][] = [$bound, $last = $this->buckets[$idx] + ($last ?? 0)]; |
||
22 | } |
||
23 | |||
24 | $s['buckets'][] = ['+Inf', $this->count]; |
||
25 | |||
26 | return $s; |
||
27 | } |
||
29 |