1 | <?php |
||
12 | final class Validator |
||
13 | { |
||
14 | const NOT_VALID_PARAM_TYPE = 'Param received "%s" is not valid. Should be %s.'; |
||
15 | |||
16 | /** |
||
17 | * Evaluates that a parameter received on a function is type string. |
||
18 | * |
||
19 | * @param string $name The name of the parameter that is being evaluated. |
||
20 | * @param mixed $value Value received on the function to be evaluated as string. |
||
21 | * |
||
22 | * @return void |
||
23 | * @throws Not valid param received on function. |
||
24 | */ |
||
25 | 2 | public static function validateParamString($name, $value) |
|
31 | |||
32 | /** |
||
33 | * Evaluates that a parameter received on a function is type boolean. |
||
34 | * |
||
35 | * @param string $name The name of the parameter that is being evaluated. |
||
36 | * @param mixed $value Value received on the function to be evaluated as boolean. |
||
37 | * |
||
38 | * @return void |
||
39 | * @throws Not valid param received on function. |
||
40 | */ |
||
41 | 1 | public static function validateParamBool($name, $value) |
|
47 | } |
||
48 |