Skip to content

Commit

Permalink
Narrow down get_browser returning array or object based on `$return…
Browse files Browse the repository at this point in the history
…_array` param
  • Loading branch information
Simon Berger committed Oct 25, 2023
1 parent c7d7b48 commit 6f32c72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stubs/CoreGenericFunctions.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

0 comments on commit 6f32c72

Please sign in to comment.