DailyDate   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStartDate() 0 3 1
A __construct() 0 3 1
A getEndDate() 0 3 1
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