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

DependencyResolverNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A forClassName() 0 8 1
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