Passed
Pull Request — master (#222)
by Rustam
02:39
created

RuleHandlerInterfaceNotImplementedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 12
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Exception;
6
7
use RuntimeException;
8
use Throwable;
9
use Yiisoft\Validator\Rule\RuleHandlerInterface;
10
11
final class RuleHandlerInterfaceNotImplementedException extends RuntimeException
12
{
13 1
    public function __construct(string $name, ?Throwable $previous = null)
14
    {
15 1
        parent::__construct(
16 1
            sprintf(
17
                'Handler "%s" should implement "%s".',
18
                $name,
19
                RuleHandlerInterface::class
20
            ),
21
            0,
22
            $previous
23
        );
24
    }
25
}
26