Completed
Push — Codacy-Fixes ( c36731...91d4f5 )
by Shawn
02:21
created

TrainingUsers::getList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
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 View Code Duplication
class TrainingUsers extends CollectionList
1 ignored issue
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
11
    public function getList() : Collection
12
    {
13
        return TrainingUser::with('user', 'training')
14
            ->whereBetween('due_date', [$this->start, $this->end])
15
            ->whereNull('completed_date')
16
            ->orderBy('training_id')
17
            ->get();
18
    }
19
}