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

tests/src/Direction/DecreasingTest.php 1 location

@@ 11-43 (lines=33) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Direction\Tests
10
 */
11
class DecrementTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @uses COG\ChronoShifter\Period\Period
15
     */
16
    public function testNextMovesToPreviousPeriod()
17
    {
18
        $periodMock = $this
19
            ->getMockBuilder('COG\ChronoShifter\Period\Period')
20
            ->setMethods(array('previous'))
21
            ->getMockForAbstractClass();
22
23
        $periodMock->expects($this->once())->method('previous');
24
25
        $direction = new Decreasing();
26
        $direction->next($periodMock);
27
    }
28
29
    public function testCompareEqualDates()
30
    {
31
        $direction = new Decreasing();
32
        $this->assertEquals(0, $direction->compare('2014-01-01 00:23:23', '2014-01-01 00:25:25'));
33
    }
34
35
    public function testFirstDateAfterSecondDate()
36
    {
37
        $direction = new Decreasing();
38
        $this->assertEquals(-1, $direction->compare('2014-01-02 00:00:00', '2014-01-01 23:59:59'));
39
    }
40
41
    public function testSecondDateAfterFirstDate()
42
    {
43
        $direction = new Decreasing();
44
        $this->assertEquals(1, $direction->compare('2014-01-01 23:59:59', '2014-01-02 00:00:00'));
45
    }
46
}

tests/src/Direction/IncreasingTest.php 1 location

@@ 11-43 (lines=33) @@
8
 * @author Kristjan Siimson <[email protected]>
9
 * @package Direction\Tests
10
 */
11
class IncrementTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @uses COG\ChronoShifter\Period\Period
15
     */
16
    public function testNextMovesToNextPeriod()
17
    {
18
        $periodMock = $this
19
            ->getMockBuilder('COG\ChronoShifter\Period\Period')
20
            ->setMethods(array('next'))
21
            ->getMockForAbstractClass();
22
23
        $periodMock->expects($this->once())->method('next');
24
25
        $direction = new Increasing();
26
        $direction->next($periodMock);
27
    }
28
29
    public function testCompareEqualDates()
30
    {
31
        $direction = new Increasing();
32
        $this->assertEquals(0, $direction->compare('2014-01-01 00:23:23', '2014-01-01 00:25:25'));
33
    }
34
35
    public function testFirstDateAfterSecondDate()
36
    {
37
        $direction = new Increasing();
38
        $this->assertEquals(1, $direction->compare('2014-01-02 00:00:00', '2014-01-01 23:59:59'));
39
    }
40
41
    public function testSecondDateAfterFirstDate()
42
    {
43
        $direction = new Increasing();
44
        $this->assertEquals(-1, $direction->compare('2014-01-01 23:59:59', '2014-01-02 00:00:00'));
45
    }
46
}