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 = 50-50 lines in 3 locations

test/Claim/ExpirationTest.php 1 location

@@ 5-54 (lines=50) @@
2
3
namespace Emarref\Jwt\Claim;
4
5
class ExpirationTest extends \PHPUnit_Framework_TestCase
6
{
7
    private static $name  = 'exp';
8
    private static $value = 1357002000;
9
10
    /**
11
     * @var Expiration
12
     */
13
    private $claim;
14
15
    public function setUp()
16
    {
17
        $this->claim = new Expiration(self::$value);
18
    }
19
20
    public function testGetName()
21
    {
22
        $this->assertSame(self::$name, $this->claim->getName());
23
    }
24
25
    public function testGetValue()
26
    {
27
        $this->assertSame(self::$value, $this->claim->getValue());
28
    }
29
30
    public function testTimestampValue()
31
    {
32
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
33
34
        $this->claim->setValue($now->getTimestamp());
35
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
36
    }
37
38
    public function testDateTimeValue()
39
    {
40
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
41
42
        $this->claim->setValue($now);
43
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
44
    }
45
46
    public function testTimezone()
47
    {
48
        $akl = new \DateTime('2014-01-01 13:00:00', new \DateTimeZone('Pacific/Auckland'));
49
        $utc = new \DateTime('2014-01-01 00:00:00', new \DateTimeZone('UTC'));
50
51
        $this->claim->setValue($akl);
52
        $this->assertSame($utc->getTimestamp(), $this->claim->getValue());
53
    }
54
}
55

test/Claim/IssuedAtTest.php 1 location

@@ 5-54 (lines=50) @@
2
3
namespace Emarref\Jwt\Claim;
4
5
class IssuedAtTest extends \PHPUnit_Framework_TestCase
6
{
7
    private static $name  = 'iat';
8
    private static $value = 1357002000;
9
10
    /**
11
     * @var IssuedAt
12
     */
13
    private $claim;
14
15
    public function setUp()
16
    {
17
        $this->claim = new IssuedAt(self::$value);
18
    }
19
20
    public function testGetName()
21
    {
22
        $this->assertSame(self::$name, $this->claim->getName());
23
    }
24
25
    public function testGetValue()
26
    {
27
        $this->assertSame(self::$value, $this->claim->getValue());
28
    }
29
30
    public function testTimestampValue()
31
    {
32
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
33
34
        $this->claim->setValue($now->getTimestamp());
35
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
36
    }
37
38
    public function testDateTimeValue()
39
    {
40
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
41
42
        $this->claim->setValue($now);
43
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
44
    }
45
46
    public function testTimezone()
47
    {
48
        $akl = new \DateTime('2014-01-01 13:00:00', new \DateTimeZone('Pacific/Auckland'));
49
        $utc = new \DateTime('2014-01-01 00:00:00', new \DateTimeZone('UTC'));
50
51
        $this->claim->setValue($akl);
52
        $this->assertSame($utc->getTimestamp(), $this->claim->getValue());
53
    }
54
}
55

test/Claim/NotBeforeTest.php 1 location

@@ 5-54 (lines=50) @@
2
3
namespace Emarref\Jwt\Claim;
4
5
class NotBeforeTest extends \PHPUnit_Framework_TestCase
6
{
7
    private static $name  = 'nbf';
8
    private static $value = 1357002000;
9
10
    /**
11
     * @var NotBefore
12
     */
13
    private $claim;
14
15
    public function setUp()
16
    {
17
        $this->claim = new NotBefore(self::$value);
18
    }
19
20
    public function testGetName()
21
    {
22
        $this->assertSame(self::$name, $this->claim->getName());
23
    }
24
25
    public function testGetValue()
26
    {
27
        $this->assertSame(self::$value, $this->claim->getValue());
28
    }
29
30
    public function testTimestampValue()
31
    {
32
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
33
34
        $this->claim->setValue($now->getTimestamp());
35
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
36
    }
37
38
    public function testDateTimeValue()
39
    {
40
        $now = new \DateTime('now', new \DateTimeZone('UTC'));
41
42
        $this->claim->setValue($now);
43
        $this->assertSame($now->getTimestamp(), $this->claim->getValue());
44
    }
45
46
    public function testTimezone()
47
    {
48
        $akl = new \DateTime('2014-01-01 13:00:00', new \DateTimeZone('Pacific/Auckland'));
49
        $utc = new \DateTime('2014-01-01 00:00:00', new \DateTimeZone('UTC'));
50
51
        $this->claim->setValue($akl);
52
        $this->assertSame($utc->getTimestamp(), $this->claim->getValue());
53
    }
54
}
55