1 | <?php |
||
6 | class Cpf implements ValidatorInterface |
||
7 | { |
||
8 | |||
9 | private $invalidCpf = [ |
||
10 | '00000000000', |
||
11 | '11111111111', |
||
12 | '22222222222', |
||
13 | '33333333333', |
||
14 | '44444444444', |
||
15 | '55555555555', |
||
16 | '66666666666', |
||
17 | '77777777777', |
||
18 | '88888888888', |
||
19 | '99999999999' |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * Returns true if and only if $value meets the validation requirements |
||
24 | * |
||
25 | * If $value fails validation, then this method returns false, and |
||
26 | * getMessages() will return an array of messages that explain why the |
||
27 | * validation failed. |
||
28 | * |
||
29 | * @param mixed $value |
||
30 | * @return bool |
||
31 | * @throws Exception\RuntimeException If validation of $value is impossible |
||
32 | */ |
||
33 | 3 | public function isValid($value) |
|
62 | 1 | ||
63 | /** |
||
64 | * Returns an array of messages that explain why the most recent isValid() |
||
65 | 1 | * call returned false. |
|
66 | * The array keys are validation failure message identifiers, |
||
67 | * and the array values are the corresponding human-readable message strings. |
||
68 | * |
||
69 | * If isValid() was never called or if the most recent isValid() call |
||
70 | * returned true, then this method returns an empty array. |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | public function getMessages() |
||
78 | } |
||
79 |