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

Travels   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getList() 0 9 1
1
<?php
2
3
namespace SET\Handlers\Calendar;
4
5
use Illuminate\Database\Eloquent\Collection;
6
use SET\Travel;
7
8
class Travels extends CollectionList
9
{
10
    public function getList() : Collection
11
    {
12
        return Travel::with('user')
13
            ->where(function ($query) {
14
                $query->whereBetween('leave_date', [$this->start, $this->end])
15
                    ->orWhereBetween('return_date', [$this->start, $this->end]);
16
            })
17
            ->get();
18
    }
19
}
20