Total Complexity | 4 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | trait Timeable |
||
8 | { |
||
9 | |||
10 | public function averageDurationMinutes() |
||
13 | } |
||
14 | |||
15 | public function averageDurationSeconds() |
||
16 | { |
||
17 | return $this->totalDurationSeconds() / $this->count(); |
||
18 | } |
||
19 | |||
20 | public function totalDurationMinutes($filter = []) |
||
21 | { |
||
22 | return $this->sum(function($item) use ($filter) { |
||
23 | return $item->info->minutes; |
||
24 | }); |
||
25 | } |
||
26 | |||
27 | public function totalDurationSeconds($filter = []) |
||
31 | }); |
||
32 | } |
||
33 | |||
34 | } |