Total Complexity | 6 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
11 | class Count extends AbstractValidation |
||
12 | { |
||
13 | const MESSAGE = 'Expected count is: %s'; |
||
14 | |||
15 | public function __construct(private int $count, string $message = null) |
||
16 | { |
||
17 | parent::__construct($message ?? sprintf(self::MESSAGE, $this->count)); |
||
18 | } |
||
19 | |||
20 | protected function evaluate($input, array $context = []): bool |
||
40 | } |
||
41 | } |
||
42 |