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 ( a3c5fc...13d483 )
by Dragos
11:38
created

AllDay   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A jsonSerialize() 0 7 1
1
<?php
2
3
namespace Speicher210\BusinessHours\Day;
4
5
use Speicher210\BusinessHours\Day\Time\AllDayTimeInterval;
6
7
/**
8
 * A day with an all day open interval.
9
 */
10
class AllDay extends Day
11
{
12
    /**
13
     * Constructor.
14
     *
15
     * @param integer $dayOfWeek The day of the week.
16
     */
17
    public function __construct($dayOfWeek)
18
    {
19
        $openingHoursIntervals = array(
20
            new AllDayTimeInterval(),
21
        );
22
23
        parent::__construct($dayOfWeek, $openingHoursIntervals);
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function jsonSerialize()
30
    {
31
        $data = parent::jsonSerialize();
32
        $data['allDay'] = true;
33
34
        return $data;
35
    }
36
}
37