* The form is '/(?:([strong ltr codepoint])|([strong rtl codepoint]))/u' .
*
* Generated by UnicodeJS (see tools/strongDir) from the UCD; see
- * https://git.wikimedia.org/summary/unicodejs.git .
+ * https://phabricator.wikimedia.org/diffusion/GUJS/ .
*/
// @codingStandardsIgnoreStart
// @codeCoverageIgnoreStart
/**
* Get a cached or new language object for a given language code
* @param string $code
+ * @throws MWException
* @return Language
*/
static function factory( $code ) {
*/
function getArrow( $direction = 'forwards' ) {
switch ( $direction ) {
- case 'forwards':
- return $this->isRTL() ? '←' : '→';
- case 'backwards':
- return $this->isRTL() ? '→' : '←';
- case 'left':
- return '←';
- case 'right':
- return '→';
- case 'up':
- return '↑';
- case 'down':
- return '↓';
+ case 'forwards':
+ return $this->isRTL() ? '←' : '→';
+ case 'backwards':
+ return $this->isRTL() ? '→' : '←';
+ case 'left':
+ return '←';
+ case 'right':
+ return '→';
+ case 'up':
+ return '↑';
+ case 'down':
+ return '↓';
}
}
}
}
- return $number;
+ return (string)$number;
}
/**
*/
public function getHtmlCode() {
if ( is_null( $this->mHtmlCode ) ) {
- $this->mHtmlCode = wfBCP47( $this->getCode() );
+ $this->mHtmlCode = LanguageCode::bcp47( $this->getCode() );
}
return $this->mHtmlCode;
}