PluginNotFound   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 3 1
1
<?php declare(strict_types=1);
2
namespace Behapi\Http;
3
4
use Throwable;
5
use InvalidArgumentException;
6
7
final class PluginNotFound extends InvalidArgumentException
8
{
9
    /** @var string */
10
    private $name;
11
12
    public function __construct(string $name, Throwable $previous = null)
13
    {
14
        $this->name = $name;
15
16
        parent::__construct("Plugin {$name} was not found.", 0, $previous);
17
    }
18
19
    public function getName(): string
20
    {
21
        return $this->name;
22
    }
23
}
24