Passed
Pull Request — master (#55)
by Jesús
03:20
created

forClassName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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