Passed
Pull Request — master (#45)
by Baptiste
02:48
created

PluginNotFound   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

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