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

Merge pull request #6082 from weirdan/update-join-signature

Update `join` signature to match `implode`
This commit is contained in:
Bruce Weirdan 2021-07-13 00:25:42 +03:00 committed by GitHub
commit bbea459226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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> :