1 | <?php |
2 | |
3 | require_once __DIR__ . "/../lib/php/BAD_REQUEST.php"; |
4 | require_once __DIR__ . "/../lib/php/ProblemDetails.php"; |
5 | |
6 | function validaPasId(false|null|int $pasId) |
7 | { |
8 | |
9 | if ($pasId === false) |
10 | throw new ProblemDetails( |
11 | status: BAD_REQUEST, |
12 | title: "Falta pasId.", |
13 | type: "/error/faltapasid.html", |
14 | detail: "La solicitud no tiene el valor de pasId." |
15 | ); |
16 | |
17 | return $pasId; |
18 | } |
19 |