| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 92.31% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | { |
||
| 14 | use HandlerClassNameTrait; |
||
| 15 | use RuleNameTrait; |
||
| 16 | |||
| 17 | 4 | public function __construct( |
|
| 18 | /** |
||
| 19 | * @var callable |
||
| 20 | */ |
||
| 21 | public $callback, |
||
| 22 | public bool $skipOnEmpty = false, |
||
| 23 | public bool $skipOnError = false, |
||
| 24 | public ?Closure $when = null, |
||
| 25 | ) { |
||
| 26 | } |
||
| 27 | |||
| 28 | 2 | public function getOptions(): array |
|
| 29 | { |
||
| 30 | return [ |
||
| 31 | 2 | 'skipOnEmpty' => $this->skipOnEmpty, |
|
| 32 | 2 | 'skipOnError' => $this->skipOnError, |
|
| 33 | ]; |
||
| 34 | } |
||
| 35 | } |
||
| 36 |