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

ES256Algorithm   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A _curveName() 0 3 1
A _mdMethod() 0 3 1
A algorithmParamValue() 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-256 and SHA-256.
12
 *
13
 * @see https://tools.ietf.org/html/rfc7518#section-3.4
14
 */
15
class ES256Algorithm extends ECDSAAlgorithm
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function algorithmParamValue(): string
21
    {
22 1
        return JWA::ALGO_ES256;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 1
    protected function _curveName(): string
29
    {
30 1
        return CurveParameter::CURVE_P256;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36 2
    protected function _mdMethod(): int
37
    {
38 2
        return OPENSSL_ALGO_SHA256;
39
    }
40
}
41