CustomValidate   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 5 1
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