/**
* Get a cached or new language object for a given language code
* @param string $code
+ * @throws MWException
* @return Language
*/
static function factory( $code ) {
*
* @since 1.28
* @param Language $lang
- * @return boolean
+ * @return bool
*/
public function equals( Language $lang ) {
return $lang->getCode() === $this->mCode;
*/
public function getHtmlCode() {
if ( is_null( $this->mHtmlCode ) ) {
- $this->mHtmlCode = wfBCP47( $this->getCode() );
+ $this->mHtmlCode = LanguageCode::bcp47( $this->getCode() );
}
return $this->mHtmlCode;
}
/**
* @param string $code
- * @param boolean $fallback Whether we're going through language fallback chain
+ * @param bool $fallback Whether we're going through language fallback chain
* @return string Name of the language class
*/
public static function classFromCode( $code, $fallback = true ) {