| 1 | <?php |
||
| 24 | trait Validator |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Validate an integer |
||
| 28 | * |
||
| 29 | * @param int $int |
||
| 30 | * @param int $minValue |
||
| 31 | * @param string $errorMessage |
||
| 32 | * |
||
| 33 | * @throws InvalidArgumentException If the value is invalid |
||
| 34 | * |
||
| 35 | * @return int |
||
| 36 | */ |
||
| 37 | protected static function validateInteger($int, $minValue, $errorMessage) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * validate a string |
||
| 47 | * |
||
| 48 | * @param mixed $str the value to evaluate as a string |
||
| 49 | * |
||
| 50 | * @throws InvalidArgumentException if the submitted data can not be converted to string |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | protected static function validateString($str) |
||
| 61 | } |
||
| 62 |