1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 22:01:48 +01:00

Fix type coercion

This commit is contained in:
Brown 2020-09-01 17:23:26 -04:00 committed by Daniil Gentili
parent fb456d2e85
commit 3fcc28618e
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -484,30 +484,38 @@ function strtoupper(string $str) : string {}
/** /**
* @psalm-pure * @psalm-pure
* *
* @param string $haystack
*
* @psalm-return positive-int|0|false * @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 * @psalm-pure
* *
* @param string $str
*
* @psalm-flow ($str) -> return * @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 * @psalm-pure
* *
* @param string $str
*
* @psalm-flow ($str) -> return * @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 * @psalm-pure
* *
* @param string $str
*
* @psalm-flow ($str) -> return * @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 * @psalm-pure