Skip to content

Commit

Permalink
Fix type coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Sep 1, 2020
1 parent 01140f1 commit 0519487
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -484,30 +484,38 @@ function strtoupper(string $str) : string {}
/**
* @psalm-pure
*
* @param string $haystack
*
* @psalm-return positive-int|0|false
*/
function strpos(string $haystack, $needle, int $offset = 0) : int {}
function strpos($haystack, $needle, int $offset = 0) : int {}

/**
* @psalm-pure
*
* @param string $str
*
* @psalm-flow ($str) -> return
*/
function trim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
function trim($str, string $character_mask = " \t\n\r\0\x0B") : string {}

/**
* @psalm-pure
*
* @param string $str
*
* @psalm-flow ($str) -> return
*/
function ltrim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
function ltrim($str, string $character_mask = " \t\n\r\0\x0B") : string {}

/**
* @psalm-pure
*
* @param string $str
*
* @psalm-flow ($str) -> return
*/
function rtrim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
function rtrim($str, string $character_mask = " \t\n\r\0\x0B") : string {}

/**
* @psalm-pure
Expand Down

0 comments on commit 0519487

Please sign in to comment.