From dc86540da2c297bddd1d86a8870aa8267cebb25d Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sat, 8 Jan 2022 01:09:57 +0100 Subject: [PATCH] Explicitly expect positive ints for depths in MD_STD::json_encode --- src/MD_STD.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MD_STD.php b/src/MD_STD.php index 1c3f9c8..1ca8792 100644 --- a/src/MD_STD.php +++ b/src/MD_STD.php @@ -234,7 +234,7 @@ final class MD_STD { * * @param array $value The value being encoded. Can be any type except a resource. * @param integer $options Bitmask consisting of JSON_FORCE_OBJECT, JSON_HEX_QUOT ... - * @param integer $depth Depth of coding. + * @param positive-int $depth Depth of coding. * * @return string */ @@ -253,9 +253,9 @@ final class MD_STD { * * @see https://www.php.net/manual/en/function.json-encode.php * - * @param object $value The value being encoded. Can be any type except a resource. - * @param integer $options Bitmask consisting of JSON_FORCE_OBJECT, JSON_HEX_QUOT ... - * @param integer $depth Depth of coding. + * @param object $value The value being encoded. Can be any type except a resource. + * @param integer $options Bitmask consisting of JSON_FORCE_OBJECT, JSON_HEX_QUOT ... + * @param positive-int $depth Depth of coding. * * @return string */