Skip to content

Review parameter names in ext/enchant #6258

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 1 commit 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
28 changes: 14 additions & 14 deletions ext/enchant/enchant.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function enchant_broker_free(EnchantBroker $broker): bool {}
function enchant_broker_get_error(EnchantBroker $broker): string|false {}

/** @deprecated */
function enchant_broker_set_dict_path(EnchantBroker $broker, int $name, string $value): bool {}
function enchant_broker_set_dict_path(EnchantBroker $broker, int $type, string $path): bool {}

/** @deprecated */
function enchant_broker_get_dict_path(EnchantBroker $broker, int $name): string|false {}
function enchant_broker_get_dict_path(EnchantBroker $broker, int $type): string|false {}

function enchant_broker_list_dicts(EnchantBroker $broker): array {}

Expand All @@ -30,7 +30,7 @@ function enchant_broker_request_dict(EnchantBroker $broker, string $tag): Enchan
function enchant_broker_request_pwl_dict(EnchantBroker $broker, string $filename): EnchantDictionary|false {}

/** @deprecated */
function enchant_broker_free_dict(EnchantDictionary $dict): bool {}
function enchant_broker_free_dict(EnchantDictionary $dictionary): bool {}

function enchant_broker_dict_exists(EnchantBroker $broker, string $tag): bool {}

Expand All @@ -39,32 +39,32 @@ function enchant_broker_set_ordering(EnchantBroker $broker, string $tag, string
function enchant_broker_describe(EnchantBroker $broker): array {}

/** @param array $suggestions */
function enchant_dict_quick_check(EnchantDictionary $dict, string $word, &$suggestions = null): bool {}
function enchant_dict_quick_check(EnchantDictionary $dictionary, string $word, &$suggestions = null): bool {}

function enchant_dict_check(EnchantDictionary $dict, string $word): bool {}
function enchant_dict_check(EnchantDictionary $dictionary, string $word): bool {}

function enchant_dict_suggest(EnchantDictionary $dict, string $word): array {}
function enchant_dict_suggest(EnchantDictionary $dictionary, string $word): array {}

function enchant_dict_add(EnchantDictionary $dict, string $word): void {}
function enchant_dict_add(EnchantDictionary $dictionary, string $word): void {}

/**
* @alias enchant_dict_add
* @deprecated
*/
function enchant_dict_add_to_personal(EnchantDictionary $dict, string $word): void {}
function enchant_dict_add_to_personal(EnchantDictionary $dictionary, string $word): void {}

function enchant_dict_add_to_session(EnchantDictionary $dict, string $word): void {}
function enchant_dict_add_to_session(EnchantDictionary $dictionary, string $word): void {}

function enchant_dict_is_added(EnchantDictionary $dict, string $word): bool {}
function enchant_dict_is_added(EnchantDictionary $dictionary, string $word): bool {}

/**
* @alias enchant_dict_is_added
* @deprecated
*/
function enchant_dict_is_in_session(EnchantDictionary $dict, string $word): bool {}
function enchant_dict_is_in_session(EnchantDictionary $dictionary, string $word): bool {}

function enchant_dict_store_replacement(EnchantDictionary $dict, string $mis, string $cor): void {}
function enchant_dict_store_replacement(EnchantDictionary $dictionary, string $misspelled, string $correct): void {}

function enchant_dict_get_error(EnchantDictionary $dict): string|false {}
function enchant_dict_get_error(EnchantDictionary $dictionary): string|false {}

function enchant_dict_describe(EnchantDictionary $dict): array {}
function enchant_dict_describe(EnchantDictionary $dictionary): array {}
28 changes: 14 additions & 14 deletions ext/enchant/enchant_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: 22c47f0b30f6952a42546c403fbd2e92836661fa */
* Stub hash: 31f7c4cd39e58d6474b90acd65f4b7bda7a6ddf3 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
ZEND_END_ARG_INFO()
Expand All @@ -14,13 +14,13 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_broker_set_dict_path, 0, 3, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, broker, EnchantBroker, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_enchant_broker_get_dict_path, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, broker, EnchantBroker, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_broker_list_dicts, 0, 1, IS_ARRAY, 0)
Expand All @@ -38,7 +38,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_request_pwl_d
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_broker_free_dict, 0, 1, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_broker_dict_exists, 0, 2, _IS_BOOL, 0)
Expand All @@ -55,23 +55,23 @@ ZEND_END_ARG_INFO()
#define arginfo_enchant_broker_describe arginfo_enchant_broker_list_dicts

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_quick_check, 0, 2, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, suggestions, "null")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_check, 0, 2, _IS_BOOL, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_suggest, 0, 2, IS_ARRAY, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_add, 0, 2, IS_VOID, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand All @@ -84,17 +84,17 @@ ZEND_END_ARG_INFO()
#define arginfo_enchant_dict_is_in_session arginfo_enchant_dict_check

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_store_replacement, 0, 3, IS_VOID, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, mis, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, cor, IS_STRING, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_ARG_TYPE_INFO(0, misspelled, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, correct, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_enchant_dict_get_error, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_enchant_dict_describe, 0, 1, IS_ARRAY, 0)
ZEND_ARG_OBJ_INFO(0, dict, EnchantDictionary, 0)
ZEND_ARG_OBJ_INFO(0, dictionary, EnchantDictionary, 0)
ZEND_END_ARG_INFO()


Expand Down