Conditions | 4 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
12 | 31 | protected function checkCondition($key, $value, $options, Element $element, FilterManager $filterManager = null) : bool |
|
13 | { |
||
14 | 31 | if (is_callable($options['condition']) || |
|
15 | 31 | (is_string($options['condition']) && function_exists($options['condition'])) |
|
16 | ) { |
||
17 | 6 | return (bool) $options['condition']($key, $value, $element, $filterManager); |
|
18 | } |
||
19 | |||
20 | 29 | return !$options['condition']; |
|
21 | } |
||
22 | } |
||
23 |