| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Callback extends Rule |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var callable |
||
| 16 | */ |
||
| 17 | private $callback; |
||
| 18 | |||
| 19 | 8 | public function __construct(callable $callback) |
|
| 22 | } |
||
| 23 | |||
| 24 | 5 | protected function validateValue($value, DataSetInterface $dataSet = null): Result |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @inheritDoc |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | 2 | public function getName(): string |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @inheritDoc |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | 3 | public function getOptions(): array |
|
| 61 |