| Total Complexity | 7 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
| 11 | class Cpf extends AbstractRule |
||
| 12 | { |
||
| 13 | const MASK = '/^[0-9]{3}\.[0-9]{3}\.[0-9]{3}\-[0-9]{2}$/'; |
||
| 14 | const LENGTH = 11; |
||
| 15 | |||
| 16 | public function __construct(private bool $mask = true, ?string $message = 'CPF inválido') |
||
| 19 | } |
||
| 20 | |||
| 21 | public function isValid(mixed $input, array $context = []): bool |
||
| 44 |