Passed
Push — master ( bc036e...f8a9bb )
by Smoren
02:19
created

RetrospectiveCheck::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Smoren\Validator\Checks;
6
7
use Smoren\Validator\Exceptions\CheckError;
8
use Smoren\Validator\Interfaces\UtilityCheckInterface;
9
10
/**
11
 * @internal
12
 */
13
class RetrospectiveCheck implements UtilityCheckInterface
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18 3
    public function execute($value, array $previousErrors): void
19
    {
20 3
        if (\count($previousErrors)) {
21 3
            throw new CheckError('retrospective', $value, $previousErrors);
22
        }
23
    }
24
}
25