| 1 | <?php |
||
| 5 | class Validator |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Required keys. |
||
| 9 | * |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | const RULES = [ |
||
| 13 | 'VA_PAYBILL', |
||
| 14 | 'VA_PASSWORD', |
||
| 15 | 'VA_TIMESTAMP', |
||
| 16 | 'VA_TRANS_ID', |
||
| 17 | 'VA_REF_ID', |
||
| 18 | 'VA_AMOUNT', |
||
| 19 | 'VA_NUMBER', |
||
| 20 | 'VA_CALL_URL', |
||
| 21 | 'VA_CALL_METHOD' |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Check if key exists else throw exception. |
||
| 26 | * |
||
| 27 | * @param array $data |
||
| 28 | * |
||
| 29 | * @return bool |
||
| 30 | * @throws InvalidRequestException |
||
| 31 | */ |
||
| 32 | public static function validate($data = []) |
||
| 41 | } |
||
| 42 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.