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.
Completed
Push — master ( 59f4b4...e271c1 )
by Joni
03:51
created
lib/JWX/JWT/Claim/Claim.php 2 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -14,118 +14,118 @@
 block discarded – undo
14 14
  */
15 15
 class Claim
16 16
 {
17
-    /**
18
-     * Claim name.
19
-     *
20
-     * @var string
21
-     */
22
-    protected $_name;
17
+	/**
18
+	 * Claim name.
19
+	 *
20
+	 * @var string
21
+	 */
22
+	protected $_name;
23 23
 
24
-    /**
25
-     * Claim value.
26
-     *
27
-     * @var mixed
28
-     */
29
-    protected $_value;
24
+	/**
25
+	 * Claim value.
26
+	 *
27
+	 * @var mixed
28
+	 */
29
+	protected $_value;
30 30
 
31
-    /**
32
-     * Claim validator.
33
-     *
34
-     * @var null|Validator
35
-     */
36
-    protected $_validator;
31
+	/**
32
+	 * Claim validator.
33
+	 *
34
+	 * @var null|Validator
35
+	 */
36
+	protected $_validator;
37 37
 
38
-    /**
39
-     * Constructor.
40
-     *
41
-     * @param string         $name      Claim name
42
-     * @param mixed          $value     Claim value
43
-     * @param null|Validator $validator Claim validator or null if claim doesn't
44
-     *                                  provide validation
45
-     */
46
-    public function __construct(string $name, $value, ?Validator $validator = null)
47
-    {
48
-        $this->_name = $name;
49
-        $this->_value = $value;
50
-        $this->_validator = $validator;
51
-    }
38
+	/**
39
+	 * Constructor.
40
+	 *
41
+	 * @param string         $name      Claim name
42
+	 * @param mixed          $value     Claim value
43
+	 * @param null|Validator $validator Claim validator or null if claim doesn't
44
+	 *                                  provide validation
45
+	 */
46
+	public function __construct(string $name, $value, ?Validator $validator = null)
47
+	{
48
+		$this->_name = $name;
49
+		$this->_value = $value;
50
+		$this->_validator = $validator;
51
+	}
52 52
 
53
-    /**
54
-     * Initialize from a name and a value.
55
-     *
56
-     * Returns a specific claim object if applicable.
57
-     *
58
-     * @param string $name  Claim name
59
-     * @param mixed  $value Claim value
60
-     *
61
-     * @return Claim
62
-     */
63
-    public static function fromNameAndValue(string $name, $value): Claim
64
-    {
65
-        if (array_key_exists($name, RegisteredClaim::MAP_NAME_TO_CLASS)) {
66
-            $cls = RegisteredClaim::MAP_NAME_TO_CLASS[$name];
67
-            return $cls::fromJSONValue($value);
68
-        }
69
-        return new self($name, $value);
70
-    }
53
+	/**
54
+	 * Initialize from a name and a value.
55
+	 *
56
+	 * Returns a specific claim object if applicable.
57
+	 *
58
+	 * @param string $name  Claim name
59
+	 * @param mixed  $value Claim value
60
+	 *
61
+	 * @return Claim
62
+	 */
63
+	public static function fromNameAndValue(string $name, $value): Claim
64
+	{
65
+		if (array_key_exists($name, RegisteredClaim::MAP_NAME_TO_CLASS)) {
66
+			$cls = RegisteredClaim::MAP_NAME_TO_CLASS[$name];
67
+			return $cls::fromJSONValue($value);
68
+		}
69
+		return new self($name, $value);
70
+	}
71 71
 
72
-    /**
73
-     * Get the claim name.
74
-     *
75
-     * @return string
76
-     */
77
-    public function name(): string
78
-    {
79
-        return $this->_name;
80
-    }
72
+	/**
73
+	 * Get the claim name.
74
+	 *
75
+	 * @return string
76
+	 */
77
+	public function name(): string
78
+	{
79
+		return $this->_name;
80
+	}
81 81
 
82
-    /**
83
-     * Get the claim value.
84
-     *
85
-     * @return mixed
86
-     */
87
-    public function value()
88
-    {
89
-        return $this->_value;
90
-    }
82
+	/**
83
+	 * Get the claim value.
84
+	 *
85
+	 * @return mixed
86
+	 */
87
+	public function value()
88
+	{
89
+		return $this->_value;
90
+	}
91 91
 
92
-    /**
93
-     * Validate the claim against a given constraint.
94
-     *
95
-     * @param mixed $constraint Constraint value
96
-     *
97
-     * @return bool True if the claim is valid
98
-     */
99
-    public function validate($constraint): bool
100
-    {
101
-        // if claim has no validator, consider validation failed
102
-        if (!isset($this->_validator)) {
103
-            return false;
104
-        }
105
-        return $this->_validator->validate($this->_value, $constraint);
106
-    }
92
+	/**
93
+	 * Validate the claim against a given constraint.
94
+	 *
95
+	 * @param mixed $constraint Constraint value
96
+	 *
97
+	 * @return bool True if the claim is valid
98
+	 */
99
+	public function validate($constraint): bool
100
+	{
101
+		// if claim has no validator, consider validation failed
102
+		if (!isset($this->_validator)) {
103
+			return false;
104
+		}
105
+		return $this->_validator->validate($this->_value, $constraint);
106
+	}
107 107
 
108
-    /**
109
-     * Validate the claim in a given context.
110
-     *
111
-     * @param ValidationContext $ctx
112
-     *
113
-     * @return bool True if claim is valid
114
-     */
115
-    public function validateWithContext(ValidationContext $ctx): bool
116
-    {
117
-        // if validator has no constraint for the claim
118
-        if (!$ctx->hasConstraint($this->_name)) {
119
-            return true;
120
-        }
121
-        $constraint = $ctx->constraint($this->_name);
122
-        // if validation context has an explicitly
123
-        // defined validator for the claim
124
-        if ($ctx->hasValidator($this->_name)) {
125
-            return $ctx->validator($this->_name)
126
-                ->validate($this->_value, $constraint);
127
-        }
128
-        // validate using claim's default validator
129
-        return $this->validate($ctx->constraint($this->_name));
130
-    }
108
+	/**
109
+	 * Validate the claim in a given context.
110
+	 *
111
+	 * @param ValidationContext $ctx
112
+	 *
113
+	 * @return bool True if claim is valid
114
+	 */
115
+	public function validateWithContext(ValidationContext $ctx): bool
116
+	{
117
+		// if validator has no constraint for the claim
118
+		if (!$ctx->hasConstraint($this->_name)) {
119
+			return true;
120
+		}
121
+		$constraint = $ctx->constraint($this->_name);
122
+		// if validation context has an explicitly
123
+		// defined validator for the claim
124
+		if ($ctx->hasValidator($this->_name)) {
125
+			return $ctx->validator($this->_name)
126
+				->validate($this->_value, $constraint);
127
+		}
128
+		// validate using claim's default validator
129
+		return $this->validate($ctx->constraint($this->_name));
130
+	}
131 131
 }
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/Parameter/X509CertificateChainParameter.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@
 block discarded – undo
14 14
  */
15 15
 class X509CertificateChainParameter extends JWTParameter
16 16
 {
17
-    use ArrayParameterValue;
17
+	use ArrayParameterValue;
18 18
 
19
-    /**
20
-     * Constructor.
21
-     *
22
-     * @param string ...$certs Base64 encoded DER certificates
23
-     */
24
-    public function __construct(string ...$certs)
25
-    {
26
-        foreach ($certs as $cert) {
27
-            if (!Base64::isValid($cert)) {
28
-                throw new \UnexpectedValueException(
29
-                    'Certificate must be base64 encoded.');
30
-            }
31
-        }
32
-        parent::__construct(self::PARAM_X509_CERTIFICATE_CHAIN, $certs);
33
-    }
19
+	/**
20
+	 * Constructor.
21
+	 *
22
+	 * @param string ...$certs Base64 encoded DER certificates
23
+	 */
24
+	public function __construct(string ...$certs)
25
+	{
26
+		foreach ($certs as $cert) {
27
+			if (!Base64::isValid($cert)) {
28
+				throw new \UnexpectedValueException(
29
+					'Certificate must be base64 encoded.');
30
+			}
31
+		}
32
+		parent::__construct(self::PARAM_X509_CERTIFICATE_CHAIN, $certs);
33
+	}
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/PBES2CountParameter.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -13,25 +13,25 @@
 block discarded – undo
13 13
  */
14 14
 class PBES2CountParameter extends JWTParameter
15 15
 {
16
-    /**
17
-     * Constructor.
18
-     *
19
-     * @param int $count
20
-     */
21
-    public function __construct(int $count)
22
-    {
23
-        parent::__construct(self::PARAM_PBES2_COUNT, $count);
24
-    }
16
+	/**
17
+	 * Constructor.
18
+	 *
19
+	 * @param int $count
20
+	 */
21
+	public function __construct(int $count)
22
+	{
23
+		parent::__construct(self::PARAM_PBES2_COUNT, $count);
24
+	}
25 25
 
26
-    /**
27
-     * Initialize from a JSON value.
28
-     *
29
-     * @param int $value
30
-     *
31
-     * @return self
32
-     */
33
-    public static function fromJSONValue($value): Parameter
34
-    {
35
-        return new self(intval($value));
36
-    }
26
+	/**
27
+	 * Initialize from a JSON value.
28
+	 *
29
+	 * @param int $value
30
+	 *
31
+	 * @return self
32
+	 */
33
+	public static function fromJSONValue($value): Parameter
34
+	{
35
+		return new self(intval($value));
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/AlgorithmParameter.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -14,27 +14,27 @@
 block discarded – undo
14 14
  */
15 15
 class AlgorithmParameter extends JWTParameter
16 16
 {
17
-    use StringParameterValue;
17
+	use StringParameterValue;
18 18
 
19
-    /**
20
-     * Constructor.
21
-     *
22
-     * @param string $algo Algorithm name
23
-     */
24
-    public function __construct(string $algo)
25
-    {
26
-        parent::__construct(self::PARAM_ALGORITHM, $algo);
27
-    }
19
+	/**
20
+	 * Constructor.
21
+	 *
22
+	 * @param string $algo Algorithm name
23
+	 */
24
+	public function __construct(string $algo)
25
+	{
26
+		parent::__construct(self::PARAM_ALGORITHM, $algo);
27
+	}
28 28
 
29
-    /**
30
-     * Initialize from AlgorithmParameterValue.
31
-     *
32
-     * @param AlgorithmParameterValue $value
33
-     *
34
-     * @return self
35
-     */
36
-    public static function fromAlgorithm(AlgorithmParameterValue $value): self
37
-    {
38
-        return new self($value->algorithmParamValue());
39
-    }
29
+	/**
30
+	 * Initialize from AlgorithmParameterValue.
31
+	 *
32
+	 * @param AlgorithmParameterValue $value
33
+	 *
34
+	 * @return self
35
+	 */
36
+	public static function fromAlgorithm(AlgorithmParameterValue $value): self
37
+	{
38
+		return new self($value->algorithmParamValue());
39
+	}
40 40
 }
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/B64PayloadParameter.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -13,25 +13,25 @@
 block discarded – undo
13 13
  */
14 14
 class B64PayloadParameter extends JWTParameter
15 15
 {
16
-    /**
17
-     * Constructor.
18
-     *
19
-     * @param bool $flag
20
-     */
21
-    public function __construct(bool $flag)
22
-    {
23
-        parent::__construct(self::PARAM_BASE64URL_ENCODE_PAYLOAD, $flag);
24
-    }
16
+	/**
17
+	 * Constructor.
18
+	 *
19
+	 * @param bool $flag
20
+	 */
21
+	public function __construct(bool $flag)
22
+	{
23
+		parent::__construct(self::PARAM_BASE64URL_ENCODE_PAYLOAD, $flag);
24
+	}
25 25
 
26
-    /**
27
-     * Initialize from a JSON value.
28
-     *
29
-     * @param bool $value
30
-     *
31
-     * @return self
32
-     */
33
-    public static function fromJSONValue($value): Parameter
34
-    {
35
-        return new self(boolval($value));
36
-    }
26
+	/**
27
+	 * Initialize from a JSON value.
28
+	 *
29
+	 * @param bool $value
30
+	 *
31
+	 * @return self
32
+	 */
33
+	public static function fromJSONValue($value): Parameter
34
+	{
35
+		return new self(boolval($value));
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/JWTParameter.php 2 patches
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -14,121 +14,121 @@
 block discarded – undo
14 14
  */
15 15
 class JWTParameter extends Parameter
16 16
 {
17
-    // registered parameter names
18
-    const PARAM_ALGORITHM = 'alg';
19
-    const PARAM_JWK_SET_URL = 'jku';
20
-    const PARAM_JSON_WEB_KEY = 'jwk';
21
-    const PARAM_KEY_ID = 'kid';
22
-    const PARAM_X509_URL = 'x5u';
23
-    const PARAM_X509_CERTIFICATE_CHAIN = 'x5c';
24
-    const PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT = 'x5t';
25
-    const PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT = 'x5t#S256';
26
-    const PARAM_TYPE = 'typ';
27
-    const PARAM_CONTENT_TYPE = 'cty';
28
-    const PARAM_CRITICAL = 'crit';
29
-    const PARAM_ENCRYPTION_ALGORITHM = 'enc';
30
-    const PARAM_COMPRESSION_ALGORITHM = 'zip';
31
-    const PARAM_EPHEMERAL_PUBLIC_KEY = 'epk';
32
-    const PARAM_AGREEMENT_PARTYUINFO = 'apu';
33
-    const PARAM_AGREEMENT_PARTYVINFO = 'apv';
34
-    const PARAM_INITIALIZATION_VECTOR = 'iv';
35
-    const PARAM_AUTHENTICATION_TAG = 'tag';
36
-    const PARAM_PBES2_SALT_INPUT = 'p2s';
37
-    const PARAM_PBES2_COUNT = 'p2c';
38
-    const PARAM_BASE64URL_ENCODE_PAYLOAD = 'b64';
17
+	// registered parameter names
18
+	const PARAM_ALGORITHM = 'alg';
19
+	const PARAM_JWK_SET_URL = 'jku';
20
+	const PARAM_JSON_WEB_KEY = 'jwk';
21
+	const PARAM_KEY_ID = 'kid';
22
+	const PARAM_X509_URL = 'x5u';
23
+	const PARAM_X509_CERTIFICATE_CHAIN = 'x5c';
24
+	const PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT = 'x5t';
25
+	const PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT = 'x5t#S256';
26
+	const PARAM_TYPE = 'typ';
27
+	const PARAM_CONTENT_TYPE = 'cty';
28
+	const PARAM_CRITICAL = 'crit';
29
+	const PARAM_ENCRYPTION_ALGORITHM = 'enc';
30
+	const PARAM_COMPRESSION_ALGORITHM = 'zip';
31
+	const PARAM_EPHEMERAL_PUBLIC_KEY = 'epk';
32
+	const PARAM_AGREEMENT_PARTYUINFO = 'apu';
33
+	const PARAM_AGREEMENT_PARTYVINFO = 'apv';
34
+	const PARAM_INITIALIZATION_VECTOR = 'iv';
35
+	const PARAM_AUTHENTICATION_TAG = 'tag';
36
+	const PARAM_PBES2_SALT_INPUT = 'p2s';
37
+	const PARAM_PBES2_COUNT = 'p2c';
38
+	const PARAM_BASE64URL_ENCODE_PAYLOAD = 'b64';
39 39
 
40
-    // shorthand aliases for parameter names
41
-    const P_ALG = self::PARAM_ALGORITHM;
42
-    const P_JKU = self::PARAM_JWK_SET_URL;
43
-    const P_JWK = self::PARAM_JSON_WEB_KEY;
44
-    const P_KID = self::PARAM_KEY_ID;
45
-    const P_X5U = self::PARAM_X509_URL;
46
-    const P_X5C = self::PARAM_X509_CERTIFICATE_CHAIN;
47
-    const P_X5T = self::PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT;
48
-    const P_X5TS256 = self::PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT;
49
-    const P_TYP = self::PARAM_TYPE;
50
-    const P_CTY = self::PARAM_CONTENT_TYPE;
51
-    const P_CRIT = self::PARAM_CRITICAL;
52
-    const P_ENC = self::PARAM_ENCRYPTION_ALGORITHM;
53
-    const P_ZIP = self::PARAM_COMPRESSION_ALGORITHM;
54
-    const P_EPK = self::PARAM_EPHEMERAL_PUBLIC_KEY;
55
-    const P_APU = self::PARAM_AGREEMENT_PARTYUINFO;
56
-    const P_APV = self::PARAM_AGREEMENT_PARTYVINFO;
57
-    const P_IV = self::PARAM_INITIALIZATION_VECTOR;
58
-    const P_TAG = self::PARAM_AUTHENTICATION_TAG;
59
-    const P_P2S = self::PARAM_PBES2_SALT_INPUT;
60
-    const P_P2C = self::PARAM_PBES2_COUNT;
61
-    const P_B64 = self::PARAM_BASE64URL_ENCODE_PAYLOAD;
40
+	// shorthand aliases for parameter names
41
+	const P_ALG = self::PARAM_ALGORITHM;
42
+	const P_JKU = self::PARAM_JWK_SET_URL;
43
+	const P_JWK = self::PARAM_JSON_WEB_KEY;
44
+	const P_KID = self::PARAM_KEY_ID;
45
+	const P_X5U = self::PARAM_X509_URL;
46
+	const P_X5C = self::PARAM_X509_CERTIFICATE_CHAIN;
47
+	const P_X5T = self::PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT;
48
+	const P_X5TS256 = self::PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT;
49
+	const P_TYP = self::PARAM_TYPE;
50
+	const P_CTY = self::PARAM_CONTENT_TYPE;
51
+	const P_CRIT = self::PARAM_CRITICAL;
52
+	const P_ENC = self::PARAM_ENCRYPTION_ALGORITHM;
53
+	const P_ZIP = self::PARAM_COMPRESSION_ALGORITHM;
54
+	const P_EPK = self::PARAM_EPHEMERAL_PUBLIC_KEY;
55
+	const P_APU = self::PARAM_AGREEMENT_PARTYUINFO;
56
+	const P_APV = self::PARAM_AGREEMENT_PARTYVINFO;
57
+	const P_IV = self::PARAM_INITIALIZATION_VECTOR;
58
+	const P_TAG = self::PARAM_AUTHENTICATION_TAG;
59
+	const P_P2S = self::PARAM_PBES2_SALT_INPUT;
60
+	const P_P2C = self::PARAM_PBES2_COUNT;
61
+	const P_B64 = self::PARAM_BASE64URL_ENCODE_PAYLOAD;
62 62
 
63
-    /**
64
-     * Mapping from registered JWT parameter name to class name.
65
-     *
66
-     * @internal
67
-     *
68
-     * @var array
69
-     */
70
-    const MAP_NAME_TO_CLASS = [
71
-        self::P_ALG => AlgorithmParameter::class,
72
-        self::P_JKU => JWKSetURLParameter::class,
73
-        self::P_JWK => JSONWebKeyParameter::class,
74
-        self::P_KID => KeyIDParameter::class,
75
-        self::P_X5U => X509URLParameter::class,
76
-        self::P_X5C => X509CertificateChainParameter::class,
77
-        self::P_X5T => X509CertificateSHA1ThumbprintParameter::class,
78
-        self::P_X5TS256 => X509CertificateSHA256ThumbprintParameter::class,
79
-        self::P_TYP => TypeParameter::class,
80
-        self::P_CTY => ContentTypeParameter::class,
81
-        self::P_CRIT => CriticalParameter::class,
82
-        self::P_ENC => EncryptionAlgorithmParameter::class,
83
-        self::P_ZIP => CompressionAlgorithmParameter::class,
84
-        self::P_IV => InitializationVectorParameter::class,
85
-        self::P_TAG => AuthenticationTagParameter::class,
86
-        self::P_P2S => PBES2SaltInputParameter::class,
87
-        self::P_P2C => PBES2CountParameter::class,
88
-        self::P_B64 => B64PayloadParameter::class,
89
-    ];
63
+	/**
64
+	 * Mapping from registered JWT parameter name to class name.
65
+	 *
66
+	 * @internal
67
+	 *
68
+	 * @var array
69
+	 */
70
+	const MAP_NAME_TO_CLASS = [
71
+		self::P_ALG => AlgorithmParameter::class,
72
+		self::P_JKU => JWKSetURLParameter::class,
73
+		self::P_JWK => JSONWebKeyParameter::class,
74
+		self::P_KID => KeyIDParameter::class,
75
+		self::P_X5U => X509URLParameter::class,
76
+		self::P_X5C => X509CertificateChainParameter::class,
77
+		self::P_X5T => X509CertificateSHA1ThumbprintParameter::class,
78
+		self::P_X5TS256 => X509CertificateSHA256ThumbprintParameter::class,
79
+		self::P_TYP => TypeParameter::class,
80
+		self::P_CTY => ContentTypeParameter::class,
81
+		self::P_CRIT => CriticalParameter::class,
82
+		self::P_ENC => EncryptionAlgorithmParameter::class,
83
+		self::P_ZIP => CompressionAlgorithmParameter::class,
84
+		self::P_IV => InitializationVectorParameter::class,
85
+		self::P_TAG => AuthenticationTagParameter::class,
86
+		self::P_P2S => PBES2SaltInputParameter::class,
87
+		self::P_P2C => PBES2CountParameter::class,
88
+		self::P_B64 => B64PayloadParameter::class,
89
+	];
90 90
 
91
-    /**
92
-     * Constructor.
93
-     *
94
-     * @param string $name  Parameter name
95
-     * @param mixed  $value Parameter value
96
-     */
97
-    public function __construct(string $name, $value)
98
-    {
99
-        $this->_name = $name;
100
-        $this->_value = $value;
101
-    }
91
+	/**
92
+	 * Constructor.
93
+	 *
94
+	 * @param string $name  Parameter name
95
+	 * @param mixed  $value Parameter value
96
+	 */
97
+	public function __construct(string $name, $value)
98
+	{
99
+		$this->_name = $name;
100
+		$this->_value = $value;
101
+	}
102 102
 
103
-    /**
104
-     * Initialize from a name and a value.
105
-     *
106
-     * Returns a parameter specific object if one is implemented.
107
-     *
108
-     * @param string $name  Parameter name
109
-     * @param mixed  $value Parameter value
110
-     *
111
-     * @return self
112
-     */
113
-    public static function fromNameAndValue(string $name, $value): self
114
-    {
115
-        if (array_key_exists($name, self::MAP_NAME_TO_CLASS)) {
116
-            $cls = self::MAP_NAME_TO_CLASS[$name];
117
-            return $cls::fromJSONValue($value);
118
-        }
119
-        return new self($name, $value);
120
-    }
103
+	/**
104
+	 * Initialize from a name and a value.
105
+	 *
106
+	 * Returns a parameter specific object if one is implemented.
107
+	 *
108
+	 * @param string $name  Parameter name
109
+	 * @param mixed  $value Parameter value
110
+	 *
111
+	 * @return self
112
+	 */
113
+	public static function fromNameAndValue(string $name, $value): self
114
+	{
115
+		if (array_key_exists($name, self::MAP_NAME_TO_CLASS)) {
116
+			$cls = self::MAP_NAME_TO_CLASS[$name];
117
+			return $cls::fromJSONValue($value);
118
+		}
119
+		return new self($name, $value);
120
+	}
121 121
 
122
-    /**
123
-     * Initialize from a JSON value.
124
-     *
125
-     * @param mixed $value
126
-     *
127
-     * @return JWTParameter
128
-     */
129
-    public static function fromJSONValue($value): Parameter
130
-    {
131
-        throw new \BadMethodCallException(
132
-            __FUNCTION__ . ' must be implemented in a derived class.');
133
-    }
122
+	/**
123
+	 * Initialize from a JSON value.
124
+	 *
125
+	 * @param mixed $value
126
+	 *
127
+	 * @return JWTParameter
128
+	 */
129
+	public static function fromJSONValue($value): Parameter
130
+	{
131
+		throw new \BadMethodCallException(
132
+			__FUNCTION__ . ' must be implemented in a derived class.');
133
+	}
134 134
 }
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/PBES2SaltInputParameter.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -13,38 +13,38 @@
 block discarded – undo
13 13
  */
14 14
 class PBES2SaltInputParameter extends JWTParameter
15 15
 {
16
-    use Base64URLValue;
16
+	use Base64URLValue;
17 17
 
18
-    /**
19
-     * Constructor.
20
-     *
21
-     * @param string $salt Base64url encoded salt input value
22
-     */
23
-    public function __construct(string $salt)
24
-    {
25
-        $this->_validateEncoding($salt);
26
-        parent::__construct(self::PARAM_PBES2_SALT_INPUT, $salt);
27
-    }
18
+	/**
19
+	 * Constructor.
20
+	 *
21
+	 * @param string $salt Base64url encoded salt input value
22
+	 */
23
+	public function __construct(string $salt)
24
+	{
25
+		$this->_validateEncoding($salt);
26
+		parent::__construct(self::PARAM_PBES2_SALT_INPUT, $salt);
27
+	}
28 28
 
29
-    /**
30
-     * Get salt input value.
31
-     *
32
-     * @return string
33
-     */
34
-    public function saltInput(): string
35
-    {
36
-        return $this->string();
37
-    }
29
+	/**
30
+	 * Get salt input value.
31
+	 *
32
+	 * @return string
33
+	 */
34
+	public function saltInput(): string
35
+	{
36
+		return $this->string();
37
+	}
38 38
 
39
-    /**
40
-     * Get computed salt value.
41
-     *
42
-     * @param AlgorithmParameter $algo
43
-     *
44
-     * @return string
45
-     */
46
-    public function salt(AlgorithmParameter $algo): string
47
-    {
48
-        return $algo->value() . "\0" . $this->saltInput();
49
-    }
39
+	/**
40
+	 * Get computed salt value.
41
+	 *
42
+	 * @param AlgorithmParameter $algo
43
+	 *
44
+	 * @return string
45
+	 */
46
+	public function salt(AlgorithmParameter $algo): string
47
+	{
48
+		return $algo->value() . "\0" . $this->saltInput();
49
+	}
50 50
 }
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/EncryptionAlgorithmParameter.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,28 +13,28 @@
 block discarded – undo
13 13
  */
14 14
 class EncryptionAlgorithmParameter extends JWTParameter
15 15
 {
16
-    use StringParameterValue;
16
+	use StringParameterValue;
17 17
 
18
-    /**
19
-     * Constructor.
20
-     *
21
-     * @param string $algo Algorithm name
22
-     */
23
-    public function __construct(string $algo)
24
-    {
25
-        parent::__construct(self::PARAM_ENCRYPTION_ALGORITHM, $algo);
26
-    }
18
+	/**
19
+	 * Constructor.
20
+	 *
21
+	 * @param string $algo Algorithm name
22
+	 */
23
+	public function __construct(string $algo)
24
+	{
25
+		parent::__construct(self::PARAM_ENCRYPTION_ALGORITHM, $algo);
26
+	}
27 27
 
28
-    /**
29
-     * Initialize from EncryptionAlgorithmParameterValue.
30
-     *
31
-     * @param EncryptionAlgorithmParameterValue $value
32
-     *
33
-     * @return self
34
-     */
35
-    public static function fromAlgorithm(
36
-        EncryptionAlgorithmParameterValue $value): JWTParameter
37
-    {
38
-        return new self($value->encryptionAlgorithmParamValue());
39
-    }
28
+	/**
29
+	 * Initialize from EncryptionAlgorithmParameterValue.
30
+	 *
31
+	 * @param EncryptionAlgorithmParameterValue $value
32
+	 *
33
+	 * @return self
34
+	 */
35
+	public static function fromAlgorithm(
36
+		EncryptionAlgorithmParameterValue $value): JWTParameter
37
+	{
38
+		return new self($value->encryptionAlgorithmParamValue());
39
+	}
40 40
 }
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\Parameter;
6 6
 
Please login to merge, or discard this patch.
lib/JWX/JWT/Parameter/CompressionAlgorithmParameter.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,28 +13,28 @@
 block discarded – undo
13 13
  */
14 14
 class CompressionAlgorithmParameter extends JWTParameter
15 15
 {
16
-    use StringParameterValue;
16
+	use StringParameterValue;
17 17
 
18
-    /**
19
-     * Constructor.
20
-     *
21
-     * @param string $algo
22
-     */
23
-    public function __construct(string $algo)
24
-    {
25
-        parent::__construct(self::PARAM_COMPRESSION_ALGORITHM, $algo);
26
-    }
18
+	/**
19
+	 * Constructor.
20
+	 *
21
+	 * @param string $algo
22
+	 */
23
+	public function __construct(string $algo)
24
+	{
25
+		parent::__construct(self::PARAM_COMPRESSION_ALGORITHM, $algo);
26
+	}
27 27
 
28
-    /**
29
-     * Initialize from CompressionAlgorithmParameterValue.
30
-     *
31
-     * @param CompressionAlgorithmParameterValue $value
32
-     *
33
-     * @return self
34
-     */
35
-    public static function fromAlgorithm(
36
-        CompressionAlgorithmParameterValue $value): JWTParameter
37
-    {
38
-        return new self($value->compressionParamValue());
39
-    }
28
+	/**
29
+	 * Initialize from CompressionAlgorithmParameterValue.
30
+	 *
31
+	 * @param CompressionAlgorithmParameterValue $value
32
+	 *
33
+	 * @return self
34
+	 */
35
+	public static function fromAlgorithm(
36
+		CompressionAlgorithmParameterValue $value): JWTParameter
37
+	{
38
+		return new self($value->compressionParamValue());
39
+	}
40 40
 }
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\Parameter;
6 6
 
Please login to merge, or discard this patch.