DuplicateServiceException::__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: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
}