1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Updated join signature to match implode

Fixes vimeo/psalm#6080
This commit is contained in:
Bruce Weirdan 2021-07-12 23:59:34 +03:00
parent e93b37a225
commit f93d925bdc
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -589,11 +589,15 @@ function implode($glue, array $pieces = []) : string {}
* @psalm-pure
*
* @param string|array $glue
* @param array<string|float|int|stringable-object|null|bool> $pieces
*
* @return (
* $glue is non-empty-string
* ? ($pieces is non-empty-array
* ? non-empty-string
* ? ($pieces is array<literal-string|literal-int>
* ? ($glue is literal-string ? non-empty-literal-string : non-empty-string)
* : non-empty-string
* )
* : string)
* : string
* )
@ -849,7 +853,7 @@ function strrev(string $string): string {}
* @param 0|1|2 $format
* @return (
* $format is 0 ?
* int :
* int :
* (
* $format is 1 ?
* list<string> :