1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Merge pull request #6206 from Jack97/update-return-types

Update return types for get_headers and get_meta_tags
This commit is contained in:
Bruce Weirdan 2021-07-29 22:38:06 +03:00 committed by GitHub
commit 6c475e0be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1266,16 +1266,20 @@ function base64_encode(string $data) : string {}
*
* @param resource|null $context
*
* @return ($format is 0 ? list<string> : array<string, string|list<string>>)|false
*
* @psalm-taint-sink ssrf $url
*/
function get_headers(string $url, int $format = 0, $context = null) : array {}
function get_headers(string $url, int $format = 0, $context = null) : array|false {}
/**
* @psalm-pure
*
* @return array<lowercase-string, string>|false
*
* @psalm-taint-sink ssrf $filename
*/
function get_meta_tags(string $filename, bool $use_include_path = false) : array {}
function get_meta_tags(string $filename, bool $use_include_path = false) : array|false {}
/**
* @return ($categorize is false ? array<string,int|string|float|bool|null|array|resource> : array<string, array<string,int|string|float|bool|null|array|resource>>)