From 4d0166fe2bd237bfe01ad732e5e74f215870f57d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 30 Jul 2024 14:09:50 +0200 Subject: [PATCH] fix function signature tests --- src/Mbstring/bootstrap80.php | 2 +- src/Util/TestListenerTrait.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mbstring/bootstrap80.php b/src/Mbstring/bootstrap80.php index 8016bdb48..5be7d2018 100644 --- a/src/Mbstring/bootstrap80.php +++ b/src/Mbstring/bootstrap80.php @@ -93,7 +93,7 @@ function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?strin function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } + function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); } } if (!function_exists('mb_http_output')) { function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } diff --git a/src/Util/TestListenerTrait.php b/src/Util/TestListenerTrait.php index 3b87d426d..37e2ee4cb 100644 --- a/src/Util/TestListenerTrait.php +++ b/src/Util/TestListenerTrait.php @@ -129,6 +129,13 @@ function {$f['name']}{$f['signature']} 'array|string|null $string' => 'array|string $string', 'array|string|null $from_encoding = null' => 'array|string|null $from_encoding = null', 'array|string|null $from_encoding' => 'array|string $from_encoding', + 'string $characters = null' => '?string $characters = null', + 'string $charset = null' => '?string $charset = null', + 'string $encoding = null' => '?string $encoding = null', + 'string $language = null' => '?string $language = null', + 'string $transfer_encoding = null' => '?string $transfer_encoding = null', + 'string $type = null' => '?string $type = null', + 'int $length = null' => '?int $length = null', ]; if (strtr($polyfillSignature, $map) !== $originalSignature) {