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