DependencyNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A mapNotFoundForClassName() 0 10 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 2
    public static function mapNotFoundForClassName(string $className): self
13
    {
14 2
        $message = <<<TXT
15 2
No concrete class was found that implements:
16 2
"{$className}"
17
Did you forget to bind this interface to a concrete class?
18
19
You might find some help here: https://gacela-project.com/docs/bootstrap/#bindings 
20 2
TXT;
21 2
        return new self($message);
22
    }
23
}
24