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.
Passed
Push — master ( e271c1...debdfc )
by Joni
06:33
created
lib/JWX/JWT/Claim/Validator/GreaterValidator.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 class GreaterValidator extends Validator
11 11
 {
12
-    /**
13
-     * {@inheritdoc}
14
-     */
15
-    public function validate($value, $constraint): bool
16
-    {
17
-        return $value > $constraint;
18
-    }
12
+	/**
13
+	 * {@inheritdoc}
14
+	 */
15
+	public function validate($value, $constraint): bool
16
+	{
17
+		return $value > $constraint;
18
+	}
19 19
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim\Validator;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/Validator/LessValidator.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 class LessValidator extends Validator
11 11
 {
12
-    /**
13
-     * {@inheritdoc}
14
-     */
15
-    public function validate($value, $constraint): bool
16
-    {
17
-        return $value < $constraint;
18
-    }
12
+	/**
13
+	 * {@inheritdoc}
14
+	 */
15
+	public function validate($value, $constraint): bool
16
+	{
17
+		return $value < $constraint;
18
+	}
19 19
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim\Validator;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/Validator/GreaterOrEqualValidator.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
  */
11 11
 class GreaterOrEqualValidator extends Validator
12 12
 {
13
-    /**
14
-     * {@inheritdoc}
15
-     */
16
-    public function validate($value, $constraint): bool
17
-    {
18
-        return $value >= $constraint;
19
-    }
13
+	/**
14
+	 * {@inheritdoc}
15
+	 */
16
+	public function validate($value, $constraint): bool
17
+	{
18
+		return $value >= $constraint;
19
+	}
20 20
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim\Validator;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/Validator/LessOrEqualValidator.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
  */
11 11
 class LessOrEqualValidator extends Validator
12 12
 {
13
-    /**
14
-     * {@inheritdoc}
15
-     */
16
-    public function validate($value, $constraint): bool
17
-    {
18
-        return $value <= $constraint;
19
-    }
13
+	/**
14
+	 * {@inheritdoc}
15
+	 */
16
+	public function validate($value, $constraint): bool
17
+	{
18
+		return $value <= $constraint;
19
+	}
20 20
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim\Validator;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/Validator/Validator.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@
 block discarded – undo
9 9
  */
10 10
 abstract class Validator
11 11
 {
12
-    /**
13
-     * Functor method.
14
-     *
15
-     * @param mixed $value
16
-     * @param mixed $constraint
17
-     *
18
-     * @return bool
19
-     */
20
-    public function __invoke($value, $constraint): bool
21
-    {
22
-        return $this->validate($value, $constraint);
23
-    }
12
+	/**
13
+	 * Functor method.
14
+	 *
15
+	 * @param mixed $value
16
+	 * @param mixed $constraint
17
+	 *
18
+	 * @return bool
19
+	 */
20
+	public function __invoke($value, $constraint): bool
21
+	{
22
+		return $this->validate($value, $constraint);
23
+	}
24 24
 
25
-    /**
26
-     * Check whether value is valid by given constraint.
27
-     *
28
-     * @param mixed $value      Value to assert
29
-     * @param mixed $constraint Constraint
30
-     *
31
-     * @return bool True if value is valid
32
-     */
33
-    abstract public function validate($value, $constraint): bool;
25
+	/**
26
+	 * Check whether value is valid by given constraint.
27
+	 *
28
+	 * @param mixed $value      Value to assert
29
+	 * @param mixed $constraint Constraint
30
+	 *
31
+	 * @return bool True if value is valid
32
+	 */
33
+	abstract public function validate($value, $constraint): bool;
34 34
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim\Validator;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/NotBeforeClaim.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,28 +15,28 @@
 block discarded – undo
15 15
  */
16 16
 class NotBeforeClaim extends RegisteredClaim
17 17
 {
18
-    use NumericDateClaim;
19
-    use ReferenceTimeValidation;
18
+	use NumericDateClaim;
19
+	use ReferenceTimeValidation;
20 20
 
21
-    /**
22
-     * Constructor.
23
-     *
24
-     * @param int $not_before Not before time as a unix timestamp
25
-     */
26
-    public function __construct(int $not_before)
27
-    {
28
-        // validate that claim is before or at the constraint (reference time)
29
-        parent::__construct(self::NAME_NOT_BEFORE, $not_before,
30
-            new LessOrEqualValidator());
31
-    }
21
+	/**
22
+	 * Constructor.
23
+	 *
24
+	 * @param int $not_before Not before time as a unix timestamp
25
+	 */
26
+	public function __construct(int $not_before)
27
+	{
28
+		// validate that claim is before or at the constraint (reference time)
29
+		parent::__construct(self::NAME_NOT_BEFORE, $not_before,
30
+			new LessOrEqualValidator());
31
+	}
32 32
 
33
-    /**
34
-     * Initialize with time set to current time.
35
-     *
36
-     * @return self
37
-     */
38
-    public static function now(): self
39
-    {
40
-        return new self(time());
41
-    }
33
+	/**
34
+	 * Initialize with time set to current time.
35
+	 *
36
+	 * @return self
37
+	 */
38
+	public static function now(): self
39
+	{
40
+		return new self(time());
41
+	}
42 42
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/TypedClaims.php 2 patches
Indentation   +184 added lines, -184 removed lines patch added patch discarded remove patch
@@ -9,188 +9,188 @@
 block discarded – undo
9 9
  */
10 10
 trait TypedClaims
11 11
 {
12
-    /**
13
-     * Check whether the claim is present.
14
-     *
15
-     * @param string $name Claim name
16
-     *
17
-     * @return bool
18
-     */
19
-    abstract public function has(string $name): bool;
20
-
21
-    /**
22
-     * Get the claim by name.
23
-     *
24
-     * @param string $name Claim name
25
-     *
26
-     * @return Claim
27
-     */
28
-    abstract public function get(string $name): Claim;
29
-
30
-    /**
31
-     * Check whether the issuer claim is present.
32
-     *
33
-     * @return bool
34
-     */
35
-    public function hasIssuer(): bool
36
-    {
37
-        return $this->has(RegisteredClaim::NAME_ISSUER);
38
-    }
39
-
40
-    /**
41
-     * Get the issuer claim.
42
-     *
43
-     * @return IssuerClaim
44
-     */
45
-    public function issuer(): IssuerClaim
46
-    {
47
-        return self::_checkType($this->get(RegisteredClaim::NAME_ISSUER),
48
-            IssuerClaim::class);
49
-    }
50
-
51
-    /**
52
-     * Check whether the subject claim is present.
53
-     *
54
-     * @return bool
55
-     */
56
-    public function hasSubject(): bool
57
-    {
58
-        return $this->has(RegisteredClaim::NAME_SUBJECT);
59
-    }
60
-
61
-    /**
62
-     * Get the subject claim.
63
-     *
64
-     * @return SubjectClaim
65
-     */
66
-    public function subject(): SubjectClaim
67
-    {
68
-        return self::_checkType($this->get(RegisteredClaim::NAME_SUBJECT),
69
-            SubjectClaim::class);
70
-    }
71
-
72
-    /**
73
-     * Check whether the audience claim is present.
74
-     *
75
-     * @return bool
76
-     */
77
-    public function hasAudience(): bool
78
-    {
79
-        return $this->has(RegisteredClaim::NAME_AUDIENCE);
80
-    }
81
-
82
-    /**
83
-     * Get the audience claim.
84
-     *
85
-     * @return AudienceClaim
86
-     */
87
-    public function audience(): AudienceClaim
88
-    {
89
-        return self::_checkType($this->get(RegisteredClaim::NAME_AUDIENCE),
90
-            AudienceClaim::class);
91
-    }
92
-
93
-    /**
94
-     * Check whether the expiration time claim is present.
95
-     *
96
-     * @return bool
97
-     */
98
-    public function hasExpirationTime(): bool
99
-    {
100
-        return $this->has(RegisteredClaim::NAME_EXPIRATION_TIME);
101
-    }
102
-
103
-    /**
104
-     * Get the expiration time claim.
105
-     *
106
-     * @return ExpirationTimeClaim
107
-     */
108
-    public function expirationTime(): ExpirationTimeClaim
109
-    {
110
-        return self::_checkType(
111
-            $this->get(RegisteredClaim::NAME_EXPIRATION_TIME),
112
-            ExpirationTimeClaim::class);
113
-    }
114
-
115
-    /**
116
-     * Check whether the not before claim is present.
117
-     *
118
-     * @return bool
119
-     */
120
-    public function hasNotBefore(): bool
121
-    {
122
-        return $this->has(RegisteredClaim::NAME_NOT_BEFORE);
123
-    }
124
-
125
-    /**
126
-     * Get the not before claim.
127
-     *
128
-     * @return NotBeforeClaim
129
-     */
130
-    public function notBefore(): NotBeforeClaim
131
-    {
132
-        return self::_checkType($this->get(RegisteredClaim::NAME_NOT_BEFORE),
133
-            NotBeforeClaim::class);
134
-    }
135
-
136
-    /**
137
-     * Check whether the issued at claim is present.
138
-     *
139
-     * @return bool
140
-     */
141
-    public function hasIssuedAt(): bool
142
-    {
143
-        return $this->has(RegisteredClaim::NAME_ISSUED_AT);
144
-    }
145
-
146
-    /**
147
-     * Get the issued at claim.
148
-     *
149
-     * @return IssuedAtClaim
150
-     */
151
-    public function issuedAt(): IssuedAtClaim
152
-    {
153
-        return self::_checkType($this->get(RegisteredClaim::NAME_ISSUED_AT),
154
-            IssuedAtClaim::class);
155
-    }
156
-
157
-    /**
158
-     * Check whether the JWT ID claim is present.
159
-     *
160
-     * @return bool
161
-     */
162
-    public function hasJWTID(): bool
163
-    {
164
-        return $this->has(RegisteredClaim::NAME_JWT_ID);
165
-    }
166
-
167
-    /**
168
-     * Get the JWT ID claim.
169
-     *
170
-     * @return JWTIDClaim
171
-     */
172
-    public function JWTID(): JWTIDClaim
173
-    {
174
-        return self::_checkType($this->get(RegisteredClaim::NAME_JWT_ID),
175
-            JWTIDClaim::class);
176
-    }
177
-
178
-    /**
179
-     * Check that the claim is an instance of the given class.
180
-     *
181
-     * @param Claim  $claim Claim object
182
-     * @param string $cls   Class name
183
-     *
184
-     * @throws \UnexpectedValueException
185
-     *
186
-     * @return Claim
187
-     */
188
-    private static function _checkType(Claim $claim, string $cls): Claim
189
-    {
190
-        if (!$claim instanceof $cls) {
191
-            throw new \UnexpectedValueException(
192
-                "{$cls} expected, got " . get_class($claim));
193
-        }
194
-        return $claim;
195
-    }
12
+	/**
13
+	 * Check whether the claim is present.
14
+	 *
15
+	 * @param string $name Claim name
16
+	 *
17
+	 * @return bool
18
+	 */
19
+	abstract public function has(string $name): bool;
20
+
21
+	/**
22
+	 * Get the claim by name.
23
+	 *
24
+	 * @param string $name Claim name
25
+	 *
26
+	 * @return Claim
27
+	 */
28
+	abstract public function get(string $name): Claim;
29
+
30
+	/**
31
+	 * Check whether the issuer claim is present.
32
+	 *
33
+	 * @return bool
34
+	 */
35
+	public function hasIssuer(): bool
36
+	{
37
+		return $this->has(RegisteredClaim::NAME_ISSUER);
38
+	}
39
+
40
+	/**
41
+	 * Get the issuer claim.
42
+	 *
43
+	 * @return IssuerClaim
44
+	 */
45
+	public function issuer(): IssuerClaim
46
+	{
47
+		return self::_checkType($this->get(RegisteredClaim::NAME_ISSUER),
48
+			IssuerClaim::class);
49
+	}
50
+
51
+	/**
52
+	 * Check whether the subject claim is present.
53
+	 *
54
+	 * @return bool
55
+	 */
56
+	public function hasSubject(): bool
57
+	{
58
+		return $this->has(RegisteredClaim::NAME_SUBJECT);
59
+	}
60
+
61
+	/**
62
+	 * Get the subject claim.
63
+	 *
64
+	 * @return SubjectClaim
65
+	 */
66
+	public function subject(): SubjectClaim
67
+	{
68
+		return self::_checkType($this->get(RegisteredClaim::NAME_SUBJECT),
69
+			SubjectClaim::class);
70
+	}
71
+
72
+	/**
73
+	 * Check whether the audience claim is present.
74
+	 *
75
+	 * @return bool
76
+	 */
77
+	public function hasAudience(): bool
78
+	{
79
+		return $this->has(RegisteredClaim::NAME_AUDIENCE);
80
+	}
81
+
82
+	/**
83
+	 * Get the audience claim.
84
+	 *
85
+	 * @return AudienceClaim
86
+	 */
87
+	public function audience(): AudienceClaim
88
+	{
89
+		return self::_checkType($this->get(RegisteredClaim::NAME_AUDIENCE),
90
+			AudienceClaim::class);
91
+	}
92
+
93
+	/**
94
+	 * Check whether the expiration time claim is present.
95
+	 *
96
+	 * @return bool
97
+	 */
98
+	public function hasExpirationTime(): bool
99
+	{
100
+		return $this->has(RegisteredClaim::NAME_EXPIRATION_TIME);
101
+	}
102
+
103
+	/**
104
+	 * Get the expiration time claim.
105
+	 *
106
+	 * @return ExpirationTimeClaim
107
+	 */
108
+	public function expirationTime(): ExpirationTimeClaim
109
+	{
110
+		return self::_checkType(
111
+			$this->get(RegisteredClaim::NAME_EXPIRATION_TIME),
112
+			ExpirationTimeClaim::class);
113
+	}
114
+
115
+	/**
116
+	 * Check whether the not before claim is present.
117
+	 *
118
+	 * @return bool
119
+	 */
120
+	public function hasNotBefore(): bool
121
+	{
122
+		return $this->has(RegisteredClaim::NAME_NOT_BEFORE);
123
+	}
124
+
125
+	/**
126
+	 * Get the not before claim.
127
+	 *
128
+	 * @return NotBeforeClaim
129
+	 */
130
+	public function notBefore(): NotBeforeClaim
131
+	{
132
+		return self::_checkType($this->get(RegisteredClaim::NAME_NOT_BEFORE),
133
+			NotBeforeClaim::class);
134
+	}
135
+
136
+	/**
137
+	 * Check whether the issued at claim is present.
138
+	 *
139
+	 * @return bool
140
+	 */
141
+	public function hasIssuedAt(): bool
142
+	{
143
+		return $this->has(RegisteredClaim::NAME_ISSUED_AT);
144
+	}
145
+
146
+	/**
147
+	 * Get the issued at claim.
148
+	 *
149
+	 * @return IssuedAtClaim
150
+	 */
151
+	public function issuedAt(): IssuedAtClaim
152
+	{
153
+		return self::_checkType($this->get(RegisteredClaim::NAME_ISSUED_AT),
154
+			IssuedAtClaim::class);
155
+	}
156
+
157
+	/**
158
+	 * Check whether the JWT ID claim is present.
159
+	 *
160
+	 * @return bool
161
+	 */
162
+	public function hasJWTID(): bool
163
+	{
164
+		return $this->has(RegisteredClaim::NAME_JWT_ID);
165
+	}
166
+
167
+	/**
168
+	 * Get the JWT ID claim.
169
+	 *
170
+	 * @return JWTIDClaim
171
+	 */
172
+	public function JWTID(): JWTIDClaim
173
+	{
174
+		return self::_checkType($this->get(RegisteredClaim::NAME_JWT_ID),
175
+			JWTIDClaim::class);
176
+	}
177
+
178
+	/**
179
+	 * Check that the claim is an instance of the given class.
180
+	 *
181
+	 * @param Claim  $claim Claim object
182
+	 * @param string $cls   Class name
183
+	 *
184
+	 * @throws \UnexpectedValueException
185
+	 *
186
+	 * @return Claim
187
+	 */
188
+	private static function _checkType(Claim $claim, string $cls): Claim
189
+	{
190
+		if (!$claim instanceof $cls) {
191
+			throw new \UnexpectedValueException(
192
+				"{$cls} expected, got " . get_class($claim));
193
+		}
194
+		return $claim;
195
+	}
196 196
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/IssuedAtClaim.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,25 +13,25 @@
 block discarded – undo
13 13
  */
14 14
 class IssuedAtClaim extends RegisteredClaim
15 15
 {
16
-    use NumericDateClaim;
16
+	use NumericDateClaim;
17 17
 
18
-    /**
19
-     * Constructor.
20
-     *
21
-     * @param int $issue_time Issued at time as a unix timestamp
22
-     */
23
-    public function __construct(int $issue_time)
24
-    {
25
-        parent::__construct(self::NAME_ISSUED_AT, $issue_time);
26
-    }
18
+	/**
19
+	 * Constructor.
20
+	 *
21
+	 * @param int $issue_time Issued at time as a unix timestamp
22
+	 */
23
+	public function __construct(int $issue_time)
24
+	{
25
+		parent::__construct(self::NAME_ISSUED_AT, $issue_time);
26
+	}
27 27
 
28
-    /**
29
-     * Initialize with time set to current time.
30
-     *
31
-     * @return self
32
-     */
33
-    public static function now(): self
34
-    {
35
-        return new self(time());
36
-    }
28
+	/**
29
+	 * Initialize with time set to current time.
30
+	 *
31
+	 * @return self
32
+	 */
33
+	public static function now(): self
34
+	{
35
+		return new self(time());
36
+	}
37 37
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Claim/AudienceClaim.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@
 block discarded – undo
13 13
  */
14 14
 class AudienceClaim extends RegisteredClaim
15 15
 {
16
-    /**
17
-     * Constructor.
18
-     *
19
-     * @param string ...$audiences One or more audiences
20
-     */
21
-    public function __construct(string ...$audiences)
22
-    {
23
-        parent::__construct(self::NAME_AUDIENCE, $audiences,
24
-            new ContainsValidator());
25
-    }
16
+	/**
17
+	 * Constructor.
18
+	 *
19
+	 * @param string ...$audiences One or more audiences
20
+	 */
21
+	public function __construct(string ...$audiences)
22
+	{
23
+		parent::__construct(self::NAME_AUDIENCE, $audiences,
24
+			new ContainsValidator());
25
+	}
26 26
 
27
-    /**
28
-     * {@inheritdoc}
29
-     */
30
-    public static function fromJSONValue($value): RegisteredClaim
31
-    {
32
-        $value = (array) $value;
33
-        return new self(...$value);
34
-    }
27
+	/**
28
+	 * {@inheritdoc}
29
+	 */
30
+	public static function fromJSONValue($value): RegisteredClaim
31
+	{
32
+		$value = (array) $value;
33
+		return new self(...$value);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Sop\JWX\JWT\Claim;
6 6
 
Please login to merge, or discard this patch.