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

Merge pull request #7073 from weirdan/strlen-no-negative-returns

This commit is contained in:
Bruce Weirdan 2021-12-05 22:04:51 +02:00 committed by GitHub
commit 056497e73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -739,9 +739,13 @@ function htmlspecialchars_decode(string $string, ?int $flags = null) : string {}
* @psalm-pure
*
* @psalm-return (
* $string is non-empty-string
* ? positive-int
* : int
* $string is ''
* ? 0
* : (
* $string is non-empty-string
* ? positive-int
* : (0|positive-int)
* )
* )
*/
function strlen(string $string) : int {}