Skip to content

Commit 9fbffe4

Browse files
committed
Review parameter names in ext/gettext
Closes GH-6241
1 parent 01b239b commit 9fbffe4

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

ext/gettext/gettext.stub.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44

55
function textdomain(?string $domain): string {}
66

7-
function gettext(string $msgid): string {}
7+
function gettext(string $message): string {}
88

99
/** @alias gettext */
10-
function _(string $msgid): string {}
10+
function _(string $message): string {}
1111

12-
function dgettext(string $domain, string $msgid): string {}
12+
function dgettext(string $domain, string $message): string {}
1313

14-
function dcgettext(string $domain, string $msgid, int $category): string {}
14+
function dcgettext(string $domain, string $message, int $category): string {}
1515

16-
function bindtextdomain(string $domain, string $dir): string|false {}
16+
function bindtextdomain(string $domain, string $directory): string|false {}
1717

1818
#ifdef HAVE_NGETTEXT
19-
function ngettext(string $msgid1, string $msgid2, int $n): string {}
19+
function ngettext(string $singular, string $plural, int $count): string {}
2020
#endif
2121

2222
#ifdef HAVE_DNGETTEXT
23-
function dngettext(string $domain, string $msgid1, string $msgid2, int $count): string {}
23+
function dngettext(string $domain, string $singular, string $plural, int $count): string {}
2424
#endif
2525

2626
#ifdef HAVE_DCNGETTEXT
27-
function dcngettext(string $domain, string $msgid1, string $msgid2, int $count, int $category): string {}
27+
function dcngettext(string $domain, string $singular, string $plural, int $count, int $category): string {}
2828
#endif
2929

3030
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET

ext/gettext/gettext_arginfo.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a8b64ae24724f0552a62cd4146f6cfb3cd75fa19 */
2+
* Stub hash: 7d0fe93cb15576756edc5aad71deadae67046690 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0)
55
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)
66
ZEND_END_ARG_INFO()
77

88
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettext, 0, 1, IS_STRING, 0)
9-
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
9+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
1010
ZEND_END_ARG_INFO()
1111

1212
#define arginfo__ arginfo_gettext
1313

1414
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dgettext, 0, 2, IS_STRING, 0)
1515
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
16-
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
16+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
1717
ZEND_END_ARG_INFO()
1818

1919
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dcgettext, 0, 3, IS_STRING, 0)
2020
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
21-
ZEND_ARG_TYPE_INFO(0, msgid, IS_STRING, 0)
21+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
2222
ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0)
2323
ZEND_END_ARG_INFO()
2424

2525
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_bindtextdomain, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
2626
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
27-
ZEND_ARG_TYPE_INFO(0, dir, IS_STRING, 0)
27+
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
2828
ZEND_END_ARG_INFO()
2929

3030
#if defined(HAVE_NGETTEXT)
3131
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ngettext, 0, 3, IS_STRING, 0)
32-
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
33-
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
34-
ZEND_ARG_TYPE_INFO(0, n, IS_LONG, 0)
32+
ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0)
33+
ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0)
34+
ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
3535
ZEND_END_ARG_INFO()
3636
#endif
3737

3838
#if defined(HAVE_DNGETTEXT)
3939
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dngettext, 0, 4, IS_STRING, 0)
4040
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
41-
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
42-
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
41+
ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0)
42+
ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0)
4343
ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
4444
ZEND_END_ARG_INFO()
4545
#endif
4646

4747
#if defined(HAVE_DCNGETTEXT)
4848
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dcngettext, 0, 5, IS_STRING, 0)
4949
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
50-
ZEND_ARG_TYPE_INFO(0, msgid1, IS_STRING, 0)
51-
ZEND_ARG_TYPE_INFO(0, msgid2, IS_STRING, 0)
50+
ZEND_ARG_TYPE_INFO(0, singular, IS_STRING, 0)
51+
ZEND_ARG_TYPE_INFO(0, plural, IS_STRING, 0)
5252
ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
5353
ZEND_ARG_TYPE_INFO(0, category, IS_LONG, 0)
5454
ZEND_END_ARG_INFO()

ext/gettext/tests/44938.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ try {
106106
--EXPECT--
107107
bindtextdomain(): Argument #1 ($domain) is too long
108108
dngettext(): Argument #1 ($domain) is too long
109-
dngettext(): Argument #2 ($msgid1) is too long
110-
dngettext(): Argument #3 ($msgid2) is too long
111-
gettext(): Argument #1 ($msgid) is too long
112-
ngettext(): Argument #1 ($msgid1) is too long
113-
ngettext(): Argument #2 ($msgid2) is too long
109+
dngettext(): Argument #2 ($singular) is too long
110+
dngettext(): Argument #3 ($plural) is too long
111+
gettext(): Argument #1 ($message) is too long
112+
ngettext(): Argument #1 ($singular) is too long
113+
ngettext(): Argument #2 ($plural) is too long
114114
dcgettext(): Argument #1 ($domain) is too long
115-
dcgettext(): Argument #2 ($msgid) is too long
115+
dcgettext(): Argument #2 ($message) is too long
116116
dcngettext(): Argument #1 ($domain) is too long
117-
dcngettext(): Argument #2 ($msgid1) is too long
118-
dcngettext(): Argument #3 ($msgid2) is too long
117+
dcngettext(): Argument #2 ($singular) is too long
118+
dcngettext(): Argument #3 ($plural) is too long
119119
dgettext(): Argument #1 ($domain) is too long
120-
dgettext(): Argument #2 ($msgid) is too long
120+
dgettext(): Argument #2 ($message) is too long
121121
textdomain(): Argument #1 ($domain) is too long

0 commit comments

Comments
 (0)