1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

fix: ltrim may return class-string #8218

Fixes #8218
This commit is contained in:
Adrien Foulon 2022-07-06 02:36:20 +02:00 committed by GitHub
parent b1568920ee
commit 6c49dad38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,6 +557,8 @@ function trim(string $string, string $characters = " \t\n\r\0\x0B") : string {}
/**
* @psalm-pure
*
* @return ($string is class-string ? ($characters is '\\' ? class-string : string) : string)
*
* @psalm-flow ($string) -> return
*/
function ltrim(string $string, string $characters = " \t\n\r\0\x0B") : string {}