Skip to content

Review parameter names in ext/pspell #6257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions ext/pspell/pspell.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,45 @@

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

function pspell_new_personal(string $personal, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int|false {}
function pspell_new_personal(
string $personal_filename,
string $language,
string $spelling = "",
string $jargon = "",
string $encoding = "",
int $mode = 0
): int|false {}

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

function pspell_check(int $pspell, string $word): bool {}
function pspell_check(int $dictionary, string $word): bool {}

function pspell_suggest(int $pspell, string $word): array|false {}
function pspell_suggest(int $dictionary, string $word): array|false {}

function pspell_store_replacement(int $pspell, string $misspell, string $correct): bool {}
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): bool {}

function pspell_add_to_personal(int $pspell, string $word): bool {}
function pspell_add_to_personal(int $dictionary, string $word): bool {}

function pspell_add_to_session(int $pspell, string $word): bool {}
function pspell_add_to_session(int $dictionary, string $word): bool {}

function pspell_clear_session(int $pspell): bool {}
function pspell_clear_session(int $dictionary): bool {}

function pspell_save_wordlist(int $pspell): bool {}
function pspell_save_wordlist(int $dictionary): bool {}

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

function pspell_config_runtogether(int $conf, bool $runtogether): bool {}
function pspell_config_runtogether(int $config, bool $allow): bool {}

function pspell_config_mode(int $conf, int $mode): bool {}
function pspell_config_mode(int $config, int $mode): bool {}

function pspell_config_ignore(int $conf, int $ignore): bool {}
function pspell_config_ignore(int $config, int $min_length): bool {}

function pspell_config_personal(int $conf, string $personal): bool {}
function pspell_config_personal(int $config, string $filename): bool {}

function pspell_config_dict_dir(int $conf, string $directory): bool {}
function pspell_config_dict_dir(int $config, string $directory): bool {}

function pspell_config_data_dir(int $conf, string $directory): bool {}
function pspell_config_data_dir(int $config, string $directory): bool {}

function pspell_config_repl(int $conf, string $repl): bool {}
function pspell_config_repl(int $config, string $filename): bool {}

function pspell_config_save_repl(int $conf, bool $save): bool {}
function pspell_config_save_repl(int $dictionary, bool $save): bool {}
37 changes: 17 additions & 20 deletions ext/pspell/pspell_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 77f9effa6d246cf2b8da121d219462cce8a99918 */
* Stub hash: 2ff30608b78e843df4e52bfc94c5fd40836648be */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
Expand All @@ -10,7 +10,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, MAY_BE_LONG|MA
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, personal_filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spelling, IS_STRING, 0, "\"\"")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, jargon, IS_STRING, 0, "\"\"")
Expand All @@ -23,18 +23,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_new_config, 0, 1, MAY_BE_
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_check, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_suggest, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_store_replacement, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, misspell, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, misspelled, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, correct, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand All @@ -43,7 +43,7 @@ ZEND_END_ARG_INFO()
#define arginfo_pspell_add_to_session arginfo_pspell_check

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_clear_session, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, pspell, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
ZEND_END_ARG_INFO()

#define arginfo_pspell_save_wordlist arginfo_pspell_clear_session
Expand All @@ -56,39 +56,36 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_create, 0, 1, IS_L
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_runtogether, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, runtogether, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, allow, _IS_BOOL, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_mode, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_ignore, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, ignore, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, min_length, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_personal, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_dict_dir, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, config, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
ZEND_END_ARG_INFO()

#define arginfo_pspell_config_data_dir arginfo_pspell_config_dict_dir

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_repl, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, repl, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_pspell_config_repl arginfo_pspell_config_personal

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_save_repl, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, conf, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, dictionary, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, save, _IS_BOOL, 0)
ZEND_END_ARG_INFO()

Expand Down