J. srv / validaPasId.php

1<?php
2
3require_once __DIR__ . "/../lib/php/BAD_REQUEST.php";
4require_once __DIR__ . "/../lib/php/ProblemDetails.php";
5
6function 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
skip_previous skip_next