Passed
Pull Request — master (#237)
by Rustam
13:25
created

RuleHandlerNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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
10
final class RuleHandlerNotFoundException extends RuntimeException
11
{
12 1
    public function __construct(string $name, ?Throwable $previous = null)
13
    {
14 1
        parent::__construct(
15 1
            sprintf(
16
                'Handler was not found for "%s" rule or unresolved "%s" class.',
17
                $name,
18
                $name
19
            ),
20
            0,
21
            $previous
22
        );
23
    }
24
}
25