1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Convert PSpell resources to objects

This commit is contained in:
Tomas Norre Mikkelsen 2021-10-04 13:41:31 +02:00
parent 2c728546e4
commit 960af957db
3 changed files with 86 additions and 17 deletions

View File

@ -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'],

View File

@ -627,6 +627,70 @@ return [
'old' => ['bool'],
'new' => ['bool', 'params=' => 'list<mixed>|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' => [],

View File

@ -18,4 +18,9 @@ namespace LDAP {
final class Connection {}
final class Result {}
final class ResultEntry {}
}
}
namespace PSpell {
final class Config {}
final class Dictionary {}
}