DefinitionNotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Furious\Container\Exception;
6
7
use InvalidArgumentException;
8
use Psr\Container\NotFoundExceptionInterface;
9
use Throwable;
10
11
class DefinitionNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
12
{
13
    public function __construct($id, $message = "", $code = 0, Throwable $previous = null)
14
    {
15
        parent::__construct($message, $code, $previous);
16
        if ('' === $message) {
17
            $this->message = 'Definition not found for {' . (string) $id . '}';
18
        }
19
    }
20
}