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

lib/JWX/JWE/KeyAlgorithm/RSAESKeyAlgorithm.php 1 location

@@ 81-91 (lines=11) @@
78
	 * @throws \UnexpectedValueException
79
	 * @return RSAESKeyAlgorithm
80
	 */
81
	public static function fromJWK(JWK $jwk, Header $header) {
82
		$alg = JWA::deriveAlgorithmName($header, $jwk);
83
		if (!array_key_exists($alg, self::MAP_ALGO_TO_CLASS)) {
84
			throw new \UnexpectedValueException("Unsupported algorithm '$alg'.");
85
		}
86
		$cls = self::MAP_ALGO_TO_CLASS[$alg];
87
		if ($jwk->has(...RSAPrivateKeyJWK::MANAGED_PARAMS)) {
88
			return $cls::fromPrivateKey(RSAPrivateKeyJWK::fromJWK($jwk));
89
		}
90
		return $cls::fromPublicKey(RSAPublicKeyJWK::fromJWK($jwk));
91
	}
92
	
93
	/**
94
	 * Initialize from a public key.

lib/JWX/JWS/Algorithm/ECDSAAlgorithm.php 1 location

@@ 93-103 (lines=11) @@
90
		return new static($jwk->publicKey(), $jwk);
91
	}
92
	
93
	public static function fromJWK(JWK $jwk, Header $header) {
94
		$alg = JWA::deriveAlgorithmName($header, $jwk);
95
		if (!array_key_exists($alg, self::MAP_ALGO_TO_CLASS)) {
96
			throw new \UnexpectedValueException("Unsupported algorithm '$alg'.");
97
		}
98
		$cls = self::MAP_ALGO_TO_CLASS[$alg];
99
		if ($jwk->has(...ECPrivateKeyJWK::MANAGED_PARAMS)) {
100
			return $cls::fromPrivateKey(ECPrivateKeyJWK::fromJWK($jwk));
101
		}
102
		return $cls::fromPublicKey(ECPublicKeyJWK::fromJWK($jwk));
103
	}
104
	
105
	/**
106
	 *

lib/JWX/JWS/Algorithm/RSASSAPKCS1Algorithm.php 1 location

@@ 74-84 (lines=11) @@
71
	 * @throws \UnexpectedValueException
72
	 * @return RSASSAPKCS1Algorithm
73
	 */
74
	public static function fromJWK(JWK $jwk, Header $header) {
75
		$alg = JWA::deriveAlgorithmName($header, $jwk);
76
		if (!array_key_exists($alg, self::MAP_ALGO_TO_CLASS)) {
77
			throw new \UnexpectedValueException("Unsupported algorithm '$alg'.");
78
		}
79
		$cls = self::MAP_ALGO_TO_CLASS[$alg];
80
		if ($jwk->has(...RSAPrivateKeyJWK::MANAGED_PARAMS)) {
81
			return $cls::fromPrivateKey(RSAPrivateKeyJWK::fromJWK($jwk));
82
		}
83
		return $cls::fromPublicKey(RSAPublicKeyJWK::fromJWK($jwk));
84
	}
85
	
86
	public function headerParameters() {
87
		return array(AlgorithmParameter::fromAlgorithm($this));