diff options
author | apaskulin <apaskulin@wikimedia.org> | 2020-03-16 16:31:05 -0700 |
---|---|---|
committer | Tim Starling <tstarling@wikimedia.org> | 2020-04-21 09:10:08 +1000 |
commit | c44488f72549331733ef261b90058fd73d7badde (patch) | |
tree | 91ac013c191dbab31525b506083ccb0b37ce3a57 /includes/language/Hook | |
parent | f5aaf75ad15813bfeb93dcb4e5fbaaa52b23c7fe (diff) | |
download | mediawikicore-c44488f72549331733ef261b90058fd73d7badde.tar.gz mediawikicore-c44488f72549331733ef261b90058fd73d7badde.zip |
docs: Hook interface doc comment review
Edited doc comments for hook interfaces to improve
consistency and add type hints.
Bug: T246855
Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
Diffstat (limited to 'includes/language/Hook')
-rw-r--r-- | includes/language/Hook/LanguageGetTranslatedLanguageNamesHook.php | 6 | ||||
-rw-r--r-- | includes/language/Hook/Language__getMessagesFileNameHook.php | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/includes/language/Hook/LanguageGetTranslatedLanguageNamesHook.php b/includes/language/Hook/LanguageGetTranslatedLanguageNamesHook.php index 0a2e6d0b36b2..6c2324efe992 100644 --- a/includes/language/Hook/LanguageGetTranslatedLanguageNamesHook.php +++ b/includes/language/Hook/LanguageGetTranslatedLanguageNamesHook.php @@ -8,12 +8,12 @@ namespace MediaWiki\Languages\Hook; */ interface LanguageGetTranslatedLanguageNamesHook { /** - * Provide translated language names. + * Use this hook to provide translated language names. * * @since 1.35 * - * @param ?mixed &$names array of language code => language name - * @param ?mixed $code language of the preferred translations + * @param array &$names Array of language code => language name + * @param string $code Language of the preferred translations * @return bool|void True or no return value to continue or false to abort */ public function onLanguageGetTranslatedLanguageNames( &$names, $code ); diff --git a/includes/language/Hook/Language__getMessagesFileNameHook.php b/includes/language/Hook/Language__getMessagesFileNameHook.php index ec5eb03a2967..55d335582370 100644 --- a/includes/language/Hook/Language__getMessagesFileNameHook.php +++ b/includes/language/Hook/Language__getMessagesFileNameHook.php @@ -9,10 +9,12 @@ namespace MediaWiki\Languages\Hook; */ interface Language__getMessagesFileNameHook { /** + * Use this hook to change the path of a localisation file. + * * @since 1.35 * - * @param ?mixed $code The language code or the language we're looking for a messages file for - * @param ?mixed &$file The messages file path, you can override this to change the location. + * @param string $code Language code or the language we're looking for a messages file for + * @param string &$file Messages file path. You can override this to change the location. * @return bool|void True or no return value to continue or false to abort */ public function onLanguage__getMessagesFileName( $code, &$file ); |