| Total Complexity | 4 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class ProcessCallback extends ARule |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param mixed $againstValue |
||
| 19 | * @throws RuleException |
||
| 20 | * @return callable |
||
| 21 | */ |
||
| 22 | 9 | protected function checkValue($againstValue) |
|
| 23 | { |
||
| 24 | 9 | if (!is_callable($againstValue)) { |
|
| 25 | 4 | throw new RuleException('Not callable. Need set call which returns boolean or throws RuleException!'); |
|
| 26 | } |
||
| 27 | 5 | return $againstValue; |
|
| 28 | } |
||
| 29 | |||
| 30 | 11 | public function validate(IValidate $entry): void |
|
| 34 | } |
||
| 35 | 6 | } |
|
| 37 |