Completed
Push — master ( 9a5cc4...561bc8 )
by Luís
12s
created

EcdsaBench   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 12
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A signingKey() 4 4 1
A verificationKey() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
declare(strict_types=1);
3
4
namespace Lcobucci\JWT\Ecdsa;
5
6
use Lcobucci\JWT\Signer\Key;
7
use Lcobucci\JWT\SignerBench;
8
9 View Code Duplication
abstract class EcdsaBench extends SignerBench
10
{
11
    protected function signingKey(): Key
12
    {
13
        return new Key('file://' . __DIR__ . '/private.key');
14
    }
15
16
    protected function verificationKey(): Key
17
    {
18
        return new Key('file://' . __DIR__ . '/public.key');
19
    }
20
}
21