Skip to content

Commit 9f7601e

Browse files
committed
Adding type-hints to json_decode
1 parent 4609eef commit 9f7601e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ script:
3131
- cd generator && ./vendor/bin/phpunit && cd ..
3232
- cd generator && composer cs-check && cd ..
3333
- cd generator && composer phpstan && cd ..
34+
- composer dump-autoload
3435
- composer cs-check
3536
- composer phpstan
3637
# Now, let's regenerate all files and see if we obtain the same set of files as the ones commited:

lib/special_cases.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @throws JsonException if the JSON cannot be decoded.
2323
* @link http://www.php.net/manual/en/function.json-decode.php
2424
*/
25-
function json_decode($json, $assoc = false, $depth = 512, $options = 0)
25+
function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
2626
{
2727
$data = \json_decode($json, $assoc, $depth, $options);
2828
if (JSON_ERROR_NONE !== json_last_error()) {

0 commit comments

Comments
 (0)