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

RuleHandlerNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 2
b 0
f 0
dl 0
loc 12
ccs 0
cts 3
cp 0
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
10
final class RuleHandlerNotFoundException extends RuntimeException
11
{
12
    public function __construct(string $name, ?Throwable $previous = null)
13
    {
14
        parent::__construct(
15
            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