| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | trait ValidateTrait |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var array<string, string> |
||
| 18 | */ |
||
| 19 | protected $errors = array(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Returns a listing of error messages. |
||
| 23 | * |
||
| 24 | * @return array<string, string> |
||
| 25 | */ |
||
| 26 | public function errors() |
||
| 29 | } |
||
| 30 | 3 | ||
| 31 | /** |
||
| 32 | 3 | * Validates the specified data based on the validation rules. |
|
| 33 | * |
||
| 34 | 3 | * @param array<string, mixed> $data |
|
| 35 | * |
||
| 36 | 3 | * @return boolean |
|
| 37 | */ |
||
| 38 | 3 | public function validate(array $data) |
|
| 56 |