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

strlen can return positive-int (#5793)

This commit is contained in:
still-dreaming-1 2021-05-19 13:20:56 -06:00 committed by GitHub
parent bbbde2ffa1
commit ecb4ca8730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -702,6 +702,17 @@ function htmlspecialchars(string $string, int $flags = ENT_COMPAT | ENT_HTML401,
*/ */
function htmlspecialchars_decode(string $string, ?int $quote_style = null) : string {} function htmlspecialchars_decode(string $string, ?int $quote_style = null) : string {}
/**
* @psalm-pure
*
* @psalm-return (
* $string is non-empty-string
* ? positive-int
* : int
* )
*/
function strlen(string $string) : int {}
/** /**
* @psalm-pure * @psalm-pure
* *