FrozenServiceException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of DivineNii opensource projects.
7
 *
8
 * PHP version 7.4 and above required
9
 *
10
 * @author    Divine Niiquaye Ibok <[email protected]>
11
 * @copyright 2021 DivineNii (https://divinenii.com/)
12
 * @license   https://opensource.org/licenses/BSD-3-Clause License
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
18
namespace Rade\DI\Exceptions;
19
20
use Psr\Container\ContainerExceptionInterface;
21
22
/**
23
 * An attempt to modify a frozen service was made.
24
 */
25
class FrozenServiceException extends \RuntimeException implements ContainerExceptionInterface
26
{
27
    /**
28
     * @param string $id Identifier of the frozen service
29
     */
30 3
    public function __construct($id)
31
    {
32 3
        parent::__construct(\sprintf('Cannot override frozen service "%s".', $id));
33 3
    }
34
}
35