Passed
Push — master ( 2b74c9...8099cd )
by Smoren
02:17
created

BaseRule::isValid()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 10
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Smoren\Validator\Rules;
6
7
use Smoren\Validator\Interfaces\RuleInterface;
8
use Smoren\Validator\Interfaces\ValidationResultInterface;
9
use Smoren\Validator\Structs\ValidationSuccessResult;
10
11
abstract class BaseRule implements RuleInterface
12
{
13
    /**
14
     * @param mixed $value
15
     * @return ValidationResultInterface
16
     */
17 68
    protected function execute($value): ValidationResultInterface
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

17
    protected function execute(/** @scrutinizer ignore-unused */ $value): ValidationResultInterface

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19 68
        return new ValidationSuccessResult(false);
20
    }
21
}
22