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.

Code Duplication    Length = 28-29 lines in 2 locations

src/Shifter/FirstFrom.php 1 location

@@ 11-39 (lines=29) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Shifter\Domain
10
 */
11
class FirstFrom implements Shifter
12
{
13
    /**
14
     * @var Evaluator
15
     */
16
    private $evaluator;
17
18
    /**
19
     * @param Evaluator $evaluator
20
     */
21
    public function __construct(Evaluator $evaluator)
22
    {
23
        $this->evaluator = $evaluator;
24
    }
25
26
    /**
27
     * /**
28
     * @param string $date
29
     * @return string
30
     */
31
    public function shift($date)
32
    {
33
        while (!$this->evaluator->is($date)) {
34
            $date = date('Y-m-d', strtotime('+1 day', strtotime($date)));
35
        }
36
37
        return $date;
38
    }
39
}
40

src/Shifter/LastTo.php 1 location

@@ 11-38 (lines=28) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Shifter\Domain
10
 */
11
class LastTo implements Shifter
12
{
13
    /**
14
     * @var Evaluator
15
     */
16
    private $evaluator;
17
18
    /**
19
     * @param Evaluator $evaluator
20
     */
21
    public function __construct(Evaluator $evaluator)
22
    {
23
        $this->evaluator = $evaluator;
24
    }
25
26
    /**
27
     * @param string $date
28
     * @return string
29
     */
30
    public function shift($date)
31
    {
32
        while (!$this->evaluator->is($date)) {
33
            $date = date('Y-m-d', strtotime('-1 day', strtotime($date)));
34
        }
35
36
        return $date;
37
    }
38
}
39