FullDayDates   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStartDate() 0 3 1
A getEndDate() 0 3 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Created by enea dhack - 14/06/2020 20:40.
4
 */
5
6
namespace Vaened\Searcher\Dates;
7
8
use Carbon\Carbon;
9
10
class FullDayDates extends Dateable
11
{
12
    private Carbon $start;
13
14
    private Carbon $end;
15
16
    public function __construct(Carbon $start, Carbon $end)
17
    {
18
        $this->start = $start;
19
        $this->end = $end;
20
    }
21
22
    public function getStartDate(): Carbon
23
    {
24
        return $this->start->startOfDay();
25
    }
26
27
    public function getEndDate(): Carbon
28
    {
29
        return $this->end->endOfDay();
30
    }
31
}
32