From 960af957db4ec0e1ca5462cd25e52a208fcc5814 Mon Sep 17 00:00:00 2001 From: Tomas Norre Mikkelsen Date: Mon, 4 Oct 2021 13:41:31 +0200 Subject: [PATCH] Convert PSpell resources to objects --- dictionaries/CallMap.php | 32 ++++++++-------- dictionaries/CallMap_81_delta.php | 64 +++++++++++++++++++++++++++++++ stubs/Php81.phpstub | 7 +++- 3 files changed, 86 insertions(+), 17 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 036c118e8..58b292a60 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -10353,25 +10353,25 @@ return [ 'ps_symbol_name' => ['string', 'psdoc'=>'resource', 'ord'=>'int', 'fontid='=>'int'], 'ps_symbol_width' => ['float', 'psdoc'=>'resource', 'ord'=>'int', 'fontid='=>'int', 'size='=>'float'], 'ps_translate' => ['bool', 'psdoc'=>'resource', 'x'=>'float', 'y'=>'float'], -'pspell_add_to_personal' => ['bool', 'dictionary'=>'int', 'word'=>'string'], -'pspell_add_to_session' => ['bool', 'dictionary'=>'int', 'word'=>'string'], -'pspell_check' => ['bool', 'dictionary'=>'int', 'word'=>'string'], -'pspell_clear_session' => ['bool', 'dictionary'=>'int'], +'pspell_add_to_personal' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], +'pspell_add_to_session' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], +'pspell_check' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], +'pspell_clear_session' => ['bool', 'dictionary'=>'PSpell\Dictionary'], 'pspell_config_create' => ['int|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string'], -'pspell_config_data_dir' => ['bool', 'config'=>'int', 'directory'=>'string'], -'pspell_config_dict_dir' => ['bool', 'config'=>'int', 'directory'=>'string'], -'pspell_config_ignore' => ['bool', 'config'=>'int', 'min_length'=>'int'], -'pspell_config_mode' => ['bool', 'config'=>'int', 'mode'=>'int'], -'pspell_config_personal' => ['bool', 'config'=>'int', 'filename'=>'string'], -'pspell_config_repl' => ['bool', 'config'=>'int', 'filename'=>'string'], -'pspell_config_runtogether' => ['bool', 'config'=>'int', 'allow'=>'bool'], -'pspell_config_save_repl' => ['bool', 'config'=>'int', 'save'=>'bool'], +'pspell_config_data_dir' => ['bool', 'config'=>'PSpell\Config', 'directory'=>'string'], +'pspell_config_dict_dir' => ['bool', 'config'=>'PSpell\Config', 'directory'=>'string'], +'pspell_config_ignore' => ['bool', 'config'=>'PSpell\Config', 'min_length'=>'int'], +'pspell_config_mode' => ['bool', 'config'=>'PSpell\Config', 'mode'=>'int'], +'pspell_config_personal' => ['bool', 'config'=>'PSpell\Config', 'filename'=>'string'], +'pspell_config_repl' => ['bool', 'config'=>'PSpell\Config', 'filename'=>'string'], +'pspell_config_runtogether' => ['bool', 'config'=>'PSpell\Config', 'allow'=>'bool'], +'pspell_config_save_repl' => ['bool', 'config'=>'PSpell\Config', 'save'=>'bool'], 'pspell_new' => ['int|false', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'], -'pspell_new_config' => ['int|false', 'config'=>'int'], +'pspell_new_config' => ['int|false', 'config'=>'PSpell\Config'], 'pspell_new_personal' => ['int|false', 'filename'=>'string', 'language'=>'string', 'spelling='=>'string', 'jargon='=>'string', 'encoding='=>'string', 'mode='=>'int'], -'pspell_save_wordlist' => ['bool', 'dictionary'=>'int'], -'pspell_store_replacement' => ['bool', 'dictionary'=>'int', 'misspelled'=>'string', 'correct'=>'string'], -'pspell_suggest' => ['array', 'dictionary'=>'int', 'word'=>'string'], +'pspell_save_wordlist' => ['bool', 'dictionary'=>'PSpell\Dictionary'], +'pspell_store_replacement' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'misspelled'=>'string', 'correct'=>'string'], +'pspell_suggest' => ['array', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], 'putenv' => ['bool', 'assignment'=>'string'], 'px_close' => ['bool', 'pxdoc'=>'resource'], 'px_create_fp' => ['bool', 'pxdoc'=>'resource', 'file'=>'resource', 'fielddesc'=>'array'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index cf516a784..9bde94acd 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -627,6 +627,70 @@ return [ 'old' => ['bool'], 'new' => ['bool', 'params=' => 'list|null'], ], + 'pspell_add_to_personal' => [ + 'old' => ['bool', 'dictionary'=>'int', 'word'=>'string'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], + ], + 'pspell_add_to_session' => [ + 'old' => ['bool', 'dictionary'=>'int', 'word'=>'string'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], + ], + 'pspell_check' => [ + 'old' => ['bool', 'dictionary'=>'int', 'word'=>'string'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], + ], + 'pspell_clear_session' => [ + 'old' => ['bool', 'dictionary'=>'int'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary'], + ], + 'pspell_config_data_dir' => [ + 'old' => ['bool', 'config'=>'int', 'directory'=>'string'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'directory'=>'string'], + ], + 'pspell_config_dict_dir' => [ + 'old' => ['bool', 'config'=>'int', 'directory'=>'string'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'directory'=>'string'], + ], + 'pspell_config_ignore' => [ + 'old' => ['bool', 'config'=>'int', 'min_length'=>'int'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'min_length'=>'int'], + ], + 'pspell_config_mode' => [ + 'old' => ['bool', 'config'=>'int', 'mode'=>'int'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'mode'=>'int'], + ], + 'pspell_config_personal' => [ + 'old' => ['bool', 'config'=>'int', 'filename'=>'string'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'filename'=>'string'], + ], + 'pspell_config_repl' => [ + 'old' => ['bool', 'config'=>'int', 'filename'=>'string'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'filename'=>'string'], + ], + 'pspell_config_runtogether' => [ + 'old' => ['bool', 'config'=>'int', 'allow'=>'bool'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'allow'=>'bool'], + ], + 'pspell_config_save_repl' => [ + 'old' => ['bool', 'config'=>'int', 'save'=>'bool'], + 'new' => ['bool', 'config'=>'PSpell\Config', 'save'=>'bool'], + ], + 'pspell_new_config' => [ + 'old' => ['int|false', 'config'=>'int'], + 'new' => ['int|false', 'config'=>'PSpell\Config'], + ], + 'pspell_save_wordlist' => [ + 'old' => ['bool', 'dictionary'=>'int'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary'], + ], + 'pspell_store_replacement' => [ + 'old' => ['bool', 'dictionary'=>'int', 'misspelled'=>'string', 'correct'=>'string'], + 'new' => ['bool', 'dictionary'=>'PSpell\Dictionary', 'misspelled'=>'string', 'correct'=>'string'], + ], + 'pspell_suggest' => [ + 'old' => ['array', 'dictionary'=>'int', 'word'=>'string'], + 'new' => ['array', 'dictionary'=>'PSpell\Dictionary', 'word'=>'string'], + ], ], 'removed' => [], diff --git a/stubs/Php81.phpstub b/stubs/Php81.phpstub index f5db06b23..4c85a7490 100644 --- a/stubs/Php81.phpstub +++ b/stubs/Php81.phpstub @@ -18,4 +18,9 @@ namespace LDAP { final class Connection {} final class Result {} final class ResultEntry {} -} \ No newline at end of file +} + +namespace PSpell { + final class Config {} + final class Dictionary {} +} \ No newline at end of file