mapNotFoundForClassName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

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