| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
| 9 | class Choice extends AbstractValidation |
||
| 10 | { |
||
| 11 | const MESSAGE = 'Invalid choice, accepted values are: %s'; |
||
| 12 | |||
| 13 | public function __construct(private array $list, private bool $strict = true, string $message = null) |
||
| 16 | } |
||
| 17 | |||
| 18 | protected function isValid($input, array $context = []): bool |
||
| 23 |