1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00

Narrow down get_browser returning array or object based on $return_array param

This commit is contained in:
Simon Berger 2023-10-24 15:03:39 +02:00
parent c7d7b48bdd
commit 6f32c723f5

View File

@ -1797,3 +1797,9 @@ if (defined('GLOB_BRACE')) {
* @psalm-taint-sink shell $command
*/
function exec(string $command, &$output = null, int &$result_code = null): string|false {}
/**
* @return ($return_array is true ? array|false : object|false)
* @psalm-ignore-falsable-return
*/
function get_browser(?string $user_agent = null, bool $return_array = false): object|array|false {}