Skip to content

Commit

Permalink
Allow passing stringable-objects to sprintf() in all PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MidnightDesign committed Sep 28, 2023
1 parent aa04c00 commit 87e0bbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion stubs/CoreGenericFunctions.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ function preg_quote(string $str, ?string $delimiter = null) : string {}
/**
* @psalm-pure
*
* @param string|int|float $values
* @param string|stringable-object|int|float $values
* @return (PHP_MAJOR_VERSION is 8 ? string : string|false)
* @psalm-ignore-falsable-return
*
Expand Down
11 changes: 0 additions & 11 deletions stubs/Php80.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,6 @@ function get_headers(string $url, bool $associative = false, $context = null) :
*/
function pack(string $format, mixed ...$values): string {}

/**
* @psalm-pure
*
* @param string|Stringable|int|float $values
* @return (PHP_MAJOR_VERSION is 8 ? string : string|false)
* @psalm-ignore-falsable-return
*
* @psalm-flow ($format, $values) -> return
*/
function sprintf(string $format, ...$values) {}

final class CurlHandle
{
private function __construct()
Expand Down

0 comments on commit 87e0bbc

Please sign in to comment.