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

NoAuthenticationException::fromExpectedTypes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
crap 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