Completed
Push — master ( 224127...d5dc6c )
by Alejandro
28s
created

NoAuthenticationException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromExpectedTypes() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Rest\Exception;
5
6
use function implode;
7
use function sprintf;
8
9
class NoAuthenticationException extends RuntimeException
10
{
11 1
    public static function fromExpectedTypes(array $expectedTypes): self
12
    {
13 1
        return new self(sprintf(
14 1
            'None of the valid authentication mechanisms where provided. Expected one of ["%s"]',
15 1
            implode('", "', $expectedTypes)
16
        ));
17
    }
18
}
19