| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Request { |
||
| 11 | /** |
||
| 12 | * Obtiene el contenido de $_POST[$var] |
||
| 13 | * @param string $var |
||
| 14 | * @return mixed|null |
||
| 15 | */ |
||
| 16 | public static function post(string $var) { |
||
| 17 | return filter_has_var(INPUT_POST, $var) ? $_POST[$var] : NULL; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Permite saber si $var está contenido dentro de $_POST |
||
| 22 | * @param string $var |
||
| 23 | * @return bool |
||
| 24 | */ |
||
| 25 | public static function hasPost(string $var):bool { |
||
| 26 | return filter_has_var(INPUT_POST, $var); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Obtiene el contenido de $var dentro de $_GET[$var] |
||
| 31 | * @param string $var |
||
| 32 | * @return mixed|null |
||
| 33 | */ |
||
| 34 | public static function get(string $var) { |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Permite saber si existe $var dentro de $_GET |
||
| 40 | * @param string $var |
||
| 41 | * @return bool |
||
| 42 | */ |
||
| 43 | public static function hasGet(string $var):bool { |
||
| 45 | } |
||
| 46 | } |
||
| 47 |