Use phpstan-specific comments for main sanitization + validation
functions
This commit is contained in:
parent
69e6850c16
commit
2bea372973
@ -14,7 +14,7 @@ final class MD_STD_IN {
|
|||||||
*
|
*
|
||||||
* @param mixed $input Input string.
|
* @param mixed $input Input string.
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return positive-int
|
||||||
*/
|
*/
|
||||||
public static function sanitize_id(mixed $input):int {
|
public static function sanitize_id(mixed $input):int {
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ final class MD_STD_IN {
|
|||||||
*
|
*
|
||||||
* @param mixed $input Input string.
|
* @param mixed $input Input string.
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return 0|positive-int
|
||||||
*/
|
*/
|
||||||
public static function sanitize_id_or_zero(mixed $input):int {
|
public static function sanitize_id_or_zero(mixed $input):int {
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ final class MD_STD_IN {
|
|||||||
*
|
*
|
||||||
* @param mixed $input Input string.
|
* @param mixed $input Input string.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return non-empty-string
|
||||||
*/
|
*/
|
||||||
public static function sanitize_rgb_color(mixed $input):string {
|
public static function sanitize_rgb_color(mixed $input):string {
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ final class MD_STD_IN {
|
|||||||
*
|
*
|
||||||
* @param array<mixed> $inputs Input array.
|
* @param array<mixed> $inputs Input array.
|
||||||
*
|
*
|
||||||
* @return list<integer>
|
* @return list<positive-int>
|
||||||
*/
|
*/
|
||||||
public static function sanitize_id_array(array $inputs):array {
|
public static function sanitize_id_array(array $inputs):array {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user