ServiceNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
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
}