Explicitly expect positive ints for depths in MD_STD::json_encode

This commit is contained in:
Joshua Ramon Enslin 2022-01-08 01:09:57 +01:00
parent e50f1f0526
commit dc86540da2
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -234,7 +234,7 @@ final class MD_STD {
*
* @param array<mixed> $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
*/