DuplicateServiceException   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:26
7
 */
8
9
namespace Specter\Container\Exceptions;
10
11
use Psr\Container\ContainerExceptionInterface;
12
13
/**
14
 * Class DuplicateServiceException
15
 * DuplicateServiceException will be thrown when the resource allready exists.
16
 * @package Specter\Container\Exceptions
17
 *
18
 * @author James Parker <[email protected]>
19
 */
20
class DuplicateServiceException extends \Exception implements ContainerExceptionInterface
21
{
22
    /**
23
     * DuplicateServiceException constructor.
24
     *
25
     * @param string $message
26
     */
27
    public function __construct(string $message)
28
    {
29
        parent::__construct(sprintf('the service %s already exists', $message));
30
    }
31
}