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.
Completed
Push — master ( 7e6465...50bb24 )
by Kevin
02:32
created

TimePeriod   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 61
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

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