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

PluginNotFound::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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