Completed
Push — master ( 83d4b9...196498 )
by Artem
59s
created

DateRange::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
/*
3
 * This file is part of the DateTime library.
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\DateTime;
14
15
/**
16
 * DateRange.
17
 *
18
 * @author Artem Henvald <[email protected]>
19
 */
20
class DateRange
21
{
22
    /** @var \DateTimeInterface */
23
    private $since;
24
25
    /** @var \DateTimeInterface */
26
    private $till;
27
28
    /**
29
     * @param \DateTimeInterface $since
30
     * @param \DateTimeInterface $till
31
     */
32
    public function __construct(\DateTimeInterface $since, \DateTimeInterface $till)
33
    {
34
        $this->since = $since;
35
        $this->till = $till;
36
    }
37
38
    /**
39
     * @return \DateTimeInterface
40
     */
41
    public function getSince(): \DateTimeInterface
42
    {
43
        return $this->since;
44
    }
45
46
    /**
47
     * @param \DateTimeInterface $since
48
     *
49
     * @return $this
50
     */
51
    public function setSince(\DateTimeInterface $since): self
52
    {
53
        $this->since = $since;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @return \DateTimeInterface
60
     */
61
    public function getTill(): \DateTimeInterface
62
    {
63
        return $this->till;
64
    }
65
66
    /**
67
     * @param \DateTimeInterface $till
68
     *
69
     * @return $this
70
     */
71
    public function setTill(\DateTimeInterface $till): self
72
    {
73
        $this->till = $till;
74
75
        return $this;
76
    }
77
}
78