Use more specific string[] type hint for language variants
This patch only touches PHPDoc documentation, nothing else. Change-Id: Ia79d06425a3b8629c171cd68ae435c64dac86f46
This commit is contained in:
parent
bf69459d50
commit
8bbf6cb2eb
3 changed files with 10 additions and 5 deletions
|
|
@ -64,6 +64,9 @@ class FakeConverter {
|
|||
return $this->mLang->getFormattedNsText( $ns );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
function getVariants() {
|
||||
return [ $this->mLang->getCode() ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4127,7 +4127,7 @@ class Language {
|
|||
* Get the list of variants supported by this language
|
||||
* see sample implementation in LanguageZh.php
|
||||
*
|
||||
* @return array An array of language codes
|
||||
* @return string[] An array of language codes
|
||||
*/
|
||||
public function getVariants() {
|
||||
return $this->mConverter->getVariants();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ class LanguageConverter {
|
|||
];
|
||||
|
||||
public $mMainLanguageCode;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $mVariants;
|
||||
public $mVariantFallbacks;
|
||||
public $mVariantNames;
|
||||
|
|
@ -75,11 +79,9 @@ class LanguageConverter {
|
|||
const CACHE_VERSION_KEY = 'VERSION 7';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Language $langobj
|
||||
* @param string $maincode The main language code of this language
|
||||
* @param array $variants The supported variants of this language
|
||||
* @param string[] $variants The supported variants of this language
|
||||
* @param array $variantfallbacks The fallback language of each variant
|
||||
* @param array $flags Defining the custom strings that maps to the flags
|
||||
* @param array $manualLevel Limit for supported variants
|
||||
|
|
@ -122,7 +124,7 @@ class LanguageConverter {
|
|||
* Get all valid variants.
|
||||
* Call this instead of using $this->mVariants directly.
|
||||
*
|
||||
* @return array Contains all valid variants
|
||||
* @return string[] Contains all valid variants
|
||||
*/
|
||||
public function getVariants() {
|
||||
return $this->mVariants;
|
||||
|
|
|
|||
Loading…
Reference in a new issue