Completed
Push — AddActivityLog ( afa80e...195157 )
by D.
45:05 queued 35:04
created

TrainingUsers::getList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace SET\Handlers\Calendar;
4
5
use Illuminate\Database\Eloquent\Collection;
6
use SET\TrainingUser;
7
8
class TrainingUsers extends CollectionList
9
{
10
    public function getList() : Collection
11
    {
12
        return TrainingUser::with('user', 'training')
13
            ->whereBetween('due_date', [$this->start, $this->end])
14
            ->whereNull('completed_date')
15
            ->orderBy('training_id')
16
            ->get();
17
    }
18
}
19