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.

ChronoShifter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A shift() 0 4 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 implements Shifter
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