Skip to content

Commit 4982964

Browse files
committed
Review parameter names in ext/pspell
Closes GH-6257
1 parent e9c7072 commit 4982964

File tree

2 files changed

+40
-36
lines changed

2 files changed

+40
-36
lines changed

ext/pspell/pspell.stub.php

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,45 @@
44

55
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int|false {}
66

7-
function pspell_new_personal(string $personal, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int|false {}
7+
function pspell_new_personal(
8+
string $filename,
9+
string $language,
10+
string $spelling = "",
11+
string $jargon = "",
12+
string $encoding = "",
13+
int $mode = 0
14+
): int|false {}
815

916
function pspell_new_config(int $config): int|false {}
1017

11-
function pspell_check(int $pspell, string $word): bool {}
18+
function pspell_check(int $dictionary, string $word): bool {}
1219

13-
function pspell_suggest(int $pspell, string $word): array|false {}
20+
function pspell_suggest(int $dictionary, string $word): array|false {}
1421

15-
function pspell_store_replacement(int $pspell, string $misspell, string $correct): bool {}
22+
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): bool {}
1623

17-
function pspell_add_to_personal(int $pspell, string $word): bool {}
24+
function pspell_add_to_personal(int $dictionary, string $word): bool {}
1825

19-
function pspell_add_to_session(int $pspell, string $word): bool {}
26+
function pspell_add_to_session(int $dictionary, string $word): bool {}
2027

21-
function pspell_clear_session(int $pspell): bool {}
28+
function pspell_clear_session(int $dictionary): bool {}
2229

23-
function pspell_save_wordlist(int $pspell): bool {}
30+
function pspell_save_wordlist(int $dictionary): bool {}
2431

2532
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = ""): int {}
2633

27-
function pspell_config_runtogether(int $conf, bool $runtogether): bool {}
34+
function pspell_config_runtogether(int $config, bool $allow): bool {}
2835

29-
function pspell_config_mode(int $conf, int $mode): bool {}
36+
function pspell_config_mode(int $config, int $mode): bool {}
3037

31-
function pspell_config_ignore(int $conf, int $ignore): bool {}
38+
function pspell_config_ignore(int $config, int $min_length): bool {}
3239

33-
function pspell_config_personal(int $conf, string $personal): bool {}
40+
function pspell_config_personal(int $config, string $filename): bool {}
3441

35-
function pspell_config_dict_dir(int $conf, string $directory): bool {}
42+
function pspell_config_dict_dir(int $config, string $directory): bool {}
3643

37-
function pspell_config_data_dir(int $conf, string $directory): bool {}
44+
function pspell_config_data_dir(int $config, string $directory): bool {}
3845

39-
function pspell_config_repl(int $conf, string $repl): bool {}
46+
function pspell_config_repl(int $config, string $filename): bool {}
4047

41-
function pspell_config_save_repl(int $conf, bool $save): bool {}
48+
function pspell_config_save_repl(int $dictionary, bool $save): bool {}

ext/pspell/pspell_arginfo.h

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 77f9effa6d246cf2b8da121d219462cce8a99918 */
2+
* Stub hash: 9a6f7791175f73d92c3b92da45f282805ea09a1c */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
@@ -10,7 +10,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MA
1010
ZEND_END_ARG_INFO()
1111

1212
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
13-
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
13+
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
1414
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
1515
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spelling, IS_STRING, 0, "\"\"")
1616
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, jargon, IS_STRING, 0, "\"\"")
@@ -23,18 +23,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_config, 0, 1, MAY_BE_
2323
ZEND_END_ARG_INFO()
2424

2525
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_check, 0, 2, _IS_BOOL, 0)
26-
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
26+
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
2727
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
2828
ZEND_END_ARG_INFO()
2929

3030
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_suggest, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
31-
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
31+
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
3232
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
3333
ZEND_END_ARG_INFO()
3434

3535
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_store_replacement, 0, 3, _IS_BOOL, 0)
36-
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
37-
ZEND_ARG_TYPE_INFO(0, misspell, IS_STRING, 0)
36+
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
37+
ZEND_ARG_TYPE_INFO(0, misspelled, IS_STRING, 0)
3838
ZEND_ARG_TYPE_INFO(0, correct, IS_STRING, 0)
3939
ZEND_END_ARG_INFO()
4040

@@ -43,7 +43,7 @@ ZEND_END_ARG_INFO()
4343
#define arginfo_pspell_add_to_session arginfo_pspell_check
4444

4545
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_clear_session, 0, 1, _IS_BOOL, 0)
46-
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
46+
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
4747
ZEND_END_ARG_INFO()
4848

4949
#define arginfo_pspell_save_wordlist arginfo_pspell_clear_session
@@ -56,39 +56,36 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_create, 0, 1, IS_L
5656
ZEND_END_ARG_INFO()
5757

5858
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_runtogether, 0, 2, _IS_BOOL, 0)
59-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
60-
ZEND_ARG_TYPE_INFO(0, runtogether, _IS_BOOL, 0)
59+
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
60+
ZEND_ARG_TYPE_INFO(0, allow, _IS_BOOL, 0)
6161
ZEND_END_ARG_INFO()
6262

6363
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_mode, 0, 2, _IS_BOOL, 0)
64-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
64+
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
6565
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
6666
ZEND_END_ARG_INFO()
6767

6868
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_ignore, 0, 2, _IS_BOOL, 0)
69-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
70-
ZEND_ARG_TYPE_INFO(0, ignore, IS_LONG, 0)
69+
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
70+
ZEND_ARG_TYPE_INFO(0, min_length, IS_LONG, 0)
7171
ZEND_END_ARG_INFO()
7272

7373
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_personal, 0, 2, _IS_BOOL, 0)
74-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
75-
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
74+
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
75+
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
7676
ZEND_END_ARG_INFO()
7777

7878
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_dict_dir, 0, 2, _IS_BOOL, 0)
79-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
79+
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
8080
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
8181
ZEND_END_ARG_INFO()
8282

8383
#define arginfo_pspell_config_data_dir arginfo_pspell_config_dict_dir
8484

85-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_repl, 0, 2, _IS_BOOL, 0)
86-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
87-
ZEND_ARG_TYPE_INFO(0, repl, IS_STRING, 0)
88-
ZEND_END_ARG_INFO()
85+
#define arginfo_pspell_config_repl arginfo_pspell_config_personal
8986

9087
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_save_repl, 0, 2, _IS_BOOL, 0)
91-
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
88+
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
9289
ZEND_ARG_TYPE_INFO(0, save, _IS_BOOL, 0)
9390
ZEND_END_ARG_INFO()
9491

0 commit comments

Comments
 (0)