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.
Passed
Pull Request — master (#18)
by Kristjan
03:23
created

ChronoShifter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace COG\ChronoShifter\Shifter;
4
5
use COG\ChronoShifter\Period\Period;
6
use COG\ChronoShifter\Selector\Selector;
7
8
/**
9
 * @author Kristjan Siimson <[email protected]>
10
 * @package Shifter\Domain
11
 */
12
class ChronoShifter
13
{
14
    /**
15
     * @var Period
16
     */
17
    private $period;
18
19
    /**
20
     * @var Selector
21
     */
22
    private $selector;
23
24
    /**
25
     * PeriodShifter constructor.
26
     * @param Selector $selector
27
     * @param Period $period
28
     */
29 78
    public function __construct(Period $period, Selector $selector)
30
    {
31 78
        $this->period = $period;
32 78
        $this->selector = $selector;
33 78
    }
34
35
    /**
36
     * @param string $date
37
     * @return string
38
     */
39 78
    public function shift($date)
40
    {
41 78
        return $this->selector->select($date, $this->period);
42
    }
43
}
44