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

Day::setNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Sourcebox\OpeningHours;
4
5
/**
6
 * Class Day
7
 * @package Sourcebox\OpeningHours
8
 */
9
class Day
10
{
11
    const MONDAY = 1;
12
    const TUESDAY = 2;
13
    const WEDNESDAY = 3;
14
    const THURSDAY = 4;
15
    const FRIDAY = 5;
16
    const SATURDAY = 6;
17
    const SUNDAY = 7;
18
19
    /**
20
     * @var int
21
     */
22
    private $number;
23
24
    /**
25
     * @var TimePeriod[]
26
     */
27
    private $timePeriods = [];
28
29 56
    public function __construct(int $number, array $timePeriods)
30
    {
31 56
        $this->setNumber($number);
32 56
        $this->setTimePeriods($timePeriods);
33 56
    }
34
35
    /**
36
     * @return string
37
     */
38 54
    public function getNumber(): string
39
    {
40 54
        return $this->number;
41
    }
42
43
    /**
44
     * @param int $number
45
     * @return Day
46
     */
47 56
    public function setNumber(int $number): Day
48
    {
49 56
        $this->number = $number;
50
51 56
        return $this;
52
    }
53
54
    /**
55
     * @return TimePeriod[]
56
     */
57 26
    public function getTimePeriods() : array
58
    {
59 26
        return $this->timePeriods;
60
    }
61
62
    /**
63
     * @param TimePeriod[] $timePeriods
64
     * @return Day
65
     */
66 56
    public function setTimePeriods(array $timePeriods) : Day
67
    {
68 56
        $this->timePeriods = $timePeriods;
69
70 56
        return $this;
71
    }
72
73
    /**
74
     * @param TimePeriod $timePeriod
75
     *
76
     * @return Day
77
     */
78 2
    public function addTimePeriod(TimePeriod $timePeriod) : Day
79
    {
80 2
        $this->timePeriods[] = $timePeriod;
81
82 2
        return $this;
83
    }
84
}
85