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

Merge pull request #8219 from Tofandel/patch-2

fix: ltrim may return class-string #8218
This commit is contained in:
orklah 2022-07-06 20:27:50 +02:00 committed by GitHub
commit 6e27c236f3
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 {}