Completed
Push — master ( fab006...1c4cac )
by Miloš
01:47
created

DefinitionNotFoundException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Laganica\Di\Exception;
4
5
use Psr\Container\NotFoundExceptionInterface;
6
7
/**
8
 * Class DefinitionNotFoundException
9
 *
10
 * @package Laganica\Di\Exception
11
 */
12
class DefinitionNotFoundException extends ContainerException implements NotFoundExceptionInterface
13
{
14
    /**
15
     * @param string $id
16
     *
17
     * @return self
18
     */
19 6
    public static function create(string $id): self
20
    {
21 6
        return new self("Definition for entry or class $id is not found");
22
    }
23
}
24