DailyDate::getEndDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by enea dhack - 29/12/2019 12:37.
4
 */
5
6
namespace Vaened\Searcher\Dates;
7
8
use Carbon\Carbon;
9
10
class DailyDate extends Dateable
11
{
12
    private Carbon $date;
13
14
    public function __construct(Carbon $date)
15
    {
16
        $this->date = $date;
17
    }
18
19
    public function getStartDate(): Carbon
20
    {
21
        return (clone $this->date)->startOfDay();
22
    }
23
24
    public function getEndDate(): Carbon
25
    {
26
        return (clone $this->date)->endOfDay();
27
    }
28
}
29