CustomizableFilterer::validateRule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 7
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * CustomizableFilterer
4
 *
5
 * @package php-logical-filter
6
 * @author  Jean Claveau
7
 */
8
namespace JClaveau\LogicalFilter\Filterer;
9
10
use       JClaveau\LogicalFilter\LogicalFilter;
11
12
/**
13
 */
14
class CustomizableFilterer extends Filterer
15
{
16
    protected $rule_validator;
17
18
    /**
19
     */
20 1
    public function __construct( callable $rule_validator )
21
    {
22 1
        $this->rule_validator = $rule_validator;
23 1
    }
24
25
    /**
26
     */
27 1
    public function validateRule($field, $operator, $value, $row, array $path, $all_operands, $options)
28
    {
29 1
        return call_user_func_array( $this->rule_validator, get_defined_vars() );
30
    }
31
32
    /**/
33
}
34