CustomValidate::validate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Linna Filter
5
 *
6
 * @author Sebastian Rapetti <[email protected]>
7
 * @copyright (c) 2018, Sebastian Rapetti
8
 * @license http://opensource.org/licenses/MIT MIT License
9
 */
10
declare(strict_types=1);
11
12
namespace Linna\Filter\Rules;
13
14
/**
15
 * Concrete Custom Validate rule class.
16
 */
17
class CustomValidate extends AbstractCustom implements RuleValidateInterface
18
{
19
    /**
20
     * Validate.
21
     *
22
     * @return bool
23
     */
24 2
    public function validate(): bool
25
    {
26 2
        $args = \func_get_args();
27
28 2
        return !\call_user_func_array($this->callback, $args);
29
    }
30
}
31