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

RuleHandlerNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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