DiServiceNotFound::createFromServiceId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
namespace UltraLite\Container\Exception;
3
4
use Psr\Container\NotFoundExceptionInterface;
5
6
class DiServiceNotFound extends \InvalidArgumentException implements NotFoundExceptionInterface
7
{
8
    /**
9
     * @param string $serviceId
10
     * @return DiServiceNotFound
11
     */
12
    public static function createFromServiceId(string $serviceId)
13
    {
14
        $message = "Service '$serviceId' requested from DI container, but not found.";
15
        return new static($message);
16
    }
17
}
18