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

Fix core return types

This commit is contained in:
Matthew Brown 2020-11-25 11:49:51 -05:00 committed by Daniil Gentili
parent 3f8fead1f7
commit 51fed99c5d
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -749,7 +749,7 @@ function str_shuffle(string $str): string {}
/** /**
* @psalm-pure * @psalm-pure
* @return list<string> * @return ($split_length is positive-int ? list<string> : false)
* *
* @psalm-flow ($string) -> return * @psalm-flow ($string) -> return
*/ */
@ -757,21 +757,26 @@ function str_split(string $string, int $split_length = 1) {}
/** /**
* @psalm-pure * @psalm-pure
* @return string|false
* @psalm-ignore-falsable-return
* *
* @psalm-flow ($haystack) -> return * @psalm-flow ($haystack) -> return
*/ */
function strstr(string $haystack, string $needle, bool $before_needle = false): string {} function strstr(string $haystack, string $needle, bool $before_needle = false) {}
/**
* @psalm-pure
*
* @psalm-flow ($haystack) -> return
*/
function stristr(string $haystack, string $needle, bool $before_needle = false): string {}
/** /**
* @psalm-pure * @psalm-pure
* @return string|false * @return string|false
* @psalm-ignore-falsable-return
*
* @psalm-flow ($haystack) -> return
*/
function stristr(string $haystack, string $needle, bool $before_needle = false) {}
/**
* @psalm-pure
* @return string|false
* @psalm-ignore-falsable-return
* *
* @psalm-flow ($haystack) -> return * @psalm-flow ($haystack) -> return
*/ */
@ -780,6 +785,7 @@ function strchr(string $haystack, string $needle, bool $before_needle = false) {
/** /**
* @psalm-pure * @psalm-pure
* @return string|false * @return string|false
* @psalm-ignore-falsable-return
* *
* @psalm-flow ($haystack) -> return * @psalm-flow ($haystack) -> return
*/ */
@ -788,10 +794,11 @@ function strpbrk(string $haystack, string $char_list) {}
/** /**
* @psalm-pure * @psalm-pure
* @return string|false * @return string|false
* @psalm-ignore-falsable-return
* *
* @psalm-flow ($haystack) -> return * @psalm-flow ($haystack) -> return
*/ */
function strrchr(string $haystack, string $needle): string {} function strrchr(string $haystack, string $needle) {}
/** /**
* @psalm-pure * @psalm-pure
@ -802,10 +809,12 @@ function strrev(string $string): string {}
/** /**
* @psalm-pure * @psalm-pure
* @return string|false
* @psalm-ignore-falsable-return
* *
* @psalm-flow ($string) -> return * @psalm-flow ($string) -> return
*/ */
function strtok(string $str, string $token): string {} function strtok(string $str, string $token) {}
/** /**
* @psalm-pure * @psalm-pure