1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

#4772 Mark 3rd argument of get_headers nullable and optional (#4774)

There is no documentation that $context is nullable but it’s better to mark is nullable and use default value so psalm will not ask to use all 3 parameters.
This commit is contained in:
Alies Lapatsin 2020-12-04 07:14:43 +03:00 committed by GitHub
parent 0411049559
commit c07cba8da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1194,11 +1194,11 @@ function base64_encode(string $data) : string {}
/**
* @psalm-pure
*
* @param resource $context
* @param resource|null $context
*
* @psalm-taint-sink ssrf $url
*/
function get_headers(string $url, int $format = 0, $context) : array {}
function get_headers(string $url, int $format = 0, $context = null) : array {}
/**
* @psalm-pure