Skip to content

Commit

Permalink
minor #486 fix function signature tests (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x branch.

Discussion
----------

fix function signature tests

Commits
-------

4d0166f fix function signature tests
  • Loading branch information
nicolas-grekas committed Sep 9, 2024
2 parents c0fee7a + 4d0166f commit 1419e0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mbstring/bootstrap80.php
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
7 changes: 7 additions & 0 deletions src/Util/TestListenerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1419e0d

Please sign in to comment.