ServiceNotFoundException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: james
5
 * Date: 23/07/2018
6
 * Time: 20:23
7
 */
8
9
namespace Specter\Container\Exceptions;
10
11
/**
12
 * Class ServiceNotFoundException
13
 * A ServiceNotFoundException should be thrown when the service is not in the container.
14
 *
15
 * @package Specter\Container\Exceptions
16
 * @author James Parker <[email protected]>
17
 */
18
class ServiceNotFoundException extends \Exception
19
{
20
    /**
21
     * ServiceNotFoundException constructor.
22
     *
23
     * @param string $message
24
     */
25
    public function __construct(string $message)
26
    {
27
        parent::__construct(sprintf('the service %s was not found in the container', $message));
28
    }
29
}