Skip to content

Commit

Permalink
Add null return type support pending #1736
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 24, 2024
1 parent f89f408 commit a80b3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/framework/src/Support/DataCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function yaml(string $name): static
*/
public static function json(string $name, bool $asArray = false): static
{
return static::discover($name, 'json', function (string $file) use ($asArray): stdClass|array {
return static::discover($name, 'json', function (string $file) use ($asArray): stdClass|array|null {
return json_decode(Filesystem::getContents($file), $asArray);
});
}
Expand Down

0 comments on commit a80b3d4

Please sign in to comment.