Skip to content

Commit 5d01f7e

Browse files
committed
json_encode never returns an empty string
1 parent 881b821 commit 5d01f7e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/component/json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#### `Functions`
1414

1515
- [decode](./../../src/Psl/Json/decode.php#L22)
16-
- [encode](./../../src/Psl/Json/encode.php#L25)
16+
- [encode](./../../src/Psl/Json/encode.php#L27)
1717
- [typed](./../../src/Psl/Json/typed.php#L20)
1818

1919

src/Psl/Json/encode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* @pure
2222
*
2323
* @throws Exception\EncodeException If an error occurred.
24+
*
25+
* @return non-empty-string
2426
*/
2527
function encode(mixed $value, bool $pretty = false, int $flags = 0): string
2628
{

0 commit comments

Comments
 (0)