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 = 32-32 lines in 2 locations

src/Direction/Decreasing.php 1 location

@@ 11-42 (lines=32) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Direction\Domain
10
 */
11
class Decreasing implements Direction
12
{
13
    /**
14
     * @param Period $period
15
     */
16
    public function next(Period $period)
17
    {
18
        $period->previous();
19
    }
20
21
    /**
22
     * @param string $first
23
     * @param string $second
24
     * @return int
25
     */
26
    public function compare($first, $second)
27
    {
28
        // Discard time info
29
        $first = substr($first, 0, 10);
30
        $second = substr($second, 0, 10);
31
32
        if ($first === $second) {
33
            $result = 0;
34
        } else if (new \DateTime($first) > new \DateTime($second)) {
35
            $result = -1;
36
        } else {
37
            $result = 1;
38
        }
39
40
        return $result;
41
    }
42
}
43

src/Direction/Increasing.php 1 location

@@ 11-42 (lines=32) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Direction\Domain
10
 */
11
class Increasing implements Direction
12
{
13
    /**
14
     * @param Period $period
15
     */
16
    public function next(Period $period)
17
    {
18
        $period->next();
19
    }
20
21
    /**
22
     * @param string $first
23
     * @param string $second
24
     * @return int
25
     */
26
    public function compare($first, $second)
27
    {
28
        // Discard time info
29
        $first = substr($first, 0, 10);
30
        $second = substr($second, 0, 10);
31
32
        if ($first === $second) {
33
            $result = 0;
34
        } else if (new \DateTime($first) > new \DateTime($second)) {
35
            $result = 1;
36
        } else {
37
            $result = -1;
38
        }
39
40
        return $result;
41
    }
42
}
43