GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TimePeriod::getUntil()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Sourcebox\OpeningHours;
5
6
/**
7
 * Class TimePeriod
8
 * @package Sourcebox\OpeningHours
9
 */
10
class TimePeriod
11
{
12
    /**
13
     * @var string
14
     */
15
    private $from;
16
17
    /**
18
     * @var string
19
     */
20
    private $until;
21
22
    /**
23
     * TimePeriod constructor.
24
     * @param string $from
25
     * @param string $until
26
     */
27 56
    public function __construct(string $from, string $until)
28
    {
29 56
        $this->from = $from;
30 56
        $this->until = $until;
31 56
    }
32
33
    /**
34
     * @return string
35
     */
36 20
    public function getFrom(): string
37
    {
38 20
        return $this->from;
39
    }
40
41
    /**
42
     * @param string $from
43
     * @return TimePeriod
44
     */
45 2
    public function setFrom(string $from): TimePeriod
46
    {
47 2
        $this->from = $from;
48
49 2
        return $this;
50
    }
51
52
    /**
53
     * @return string
54
     */
55 20
    public function getUntil(): string
56
    {
57 20
        return $this->until;
58
    }
59
60
    /**
61
     * @param string $until
62
     * @return TimePeriod
63
     */
64 2
    public function setUntil(string $until): TimePeriod
65
    {
66 2
        $this->until = $until;
67
68 2
        return $this;
69
    }
70
}
71