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
Branch php72 (880eb0)
by Joni
05:58
created

ES512Algorithm   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 4
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A _mdMethod() 0 3 1
A algorithmParamValue() 0 3 1
A _curveName() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Sop\JWX\JWS\Algorithm;
6
7
use Sop\JWX\JWA\JWA;
8
use Sop\JWX\JWK\Parameter\CurveParameter;
9
10
/**
11
 * Implements ECDSA using P-521 and SHA-512.
12
 *
13
 * @see https://tools.ietf.org/html/rfc7518#section-3.4
14
 */
15
class ES512Algorithm extends ECDSAAlgorithm
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 4
    public function algorithmParamValue(): string
21
    {
22 4
        return JWA::ALGO_ES512;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 7
    protected function _curveName(): string
29
    {
30 7
        return CurveParameter::CURVE_P521;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36 4
    protected function _mdMethod(): int
37
    {
38 4
        return OPENSSL_ALGO_SHA512;
39
    }
40
}
41