Passed
Branch main (61b4ec)
by Chema
02:26
created

mapNotFoundForClassName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Container\Exception;
6
7
use Psr\Container\NotFoundExceptionInterface;
8
use RuntimeException;
9
10
final class DependencyNotFoundException extends RuntimeException implements NotFoundExceptionInterface
11
{
12 1
    public static function mapNotFoundForClassName(string $className): self
13
    {
14 1
        $message = <<<TXT
15 1
Did you forget to map this interface to a concrete class? No concrete class was found that implements:
16 1
{$className}
17 1
TXT;
18 1
        return new self($message);
19
    }
20
}
21