Update docs and type hints

Change-Id: I6c513265d7e3136c43c160b86a83a921defaa3ec
This commit is contained in:
Siebrand Mazeland
2013-06-17 16:33:52 +02:00
parent d8434da23f
commit 1aa4940de7
3 changed files with 13 additions and 6 deletions

View File

@@ -23,6 +23,9 @@
* Resource loader module for providing MediaWiki language names.
*/
class ResourceLoaderULSModule extends ResourceLoaderModule {
/**
* @var Language
*/
protected $language;
protected $targets = array( 'desktop', 'mobile' );

View File

@@ -21,6 +21,8 @@
class UniversalLanguageSelectorHooks {
/**
* Whether ULS user toolbar (language selection and settings) is enabled.
*
* @param User $user
* @return bool
*/
public static function isToolbarEnabled( $user ) {
@@ -35,8 +37,8 @@ class UniversalLanguageSelectorHooks {
}
/**
* @param $out OutputPage
* @param $skin Skin
* @param OutputPage $out
* @param Skin $skin
* @return bool
* Hook: BeforePageDisplay
*/
@@ -64,7 +66,7 @@ class UniversalLanguageSelectorHooks {
/**
* @param $testModules array of javascript testing modules. 'qunit' is fed
* using tests/qunit/QUnitTestResources.php.
* @param $resourceLoader ResourceLoader
* @param ResourceLoader $resourceLoader
* @return bool
* Hook: ResourceLoaderTestModules
*/
@@ -158,8 +160,9 @@ class UniversalLanguageSelectorHooks {
/**
* Hook to UserGetLanguageObject
* @param $user User
* @param $code String
* @param User $user
* @param string $code
* @param RequestContext $context Optional RequestContext
* @return bool
*/
public static function getLanguage( $user, &$code, $context = null ) {
@@ -239,7 +242,7 @@ class UniversalLanguageSelectorHooks {
/**
* Hook: ResourceLoaderGetConfigVars
* @param $vars Array
* @param array $vars
* @return bool
*/
public static function addConfig( &$vars ) {

View File

@@ -146,6 +146,7 @@ $wgExtensionFunctions[] = function() {
if ( $wgULSGeoService === true ) {
$wgHooks['BeforePageDisplay'][] = function( &$out ) {
/** @var OutputPage $out */
$out->addScript( '<script src="//bits.wikimedia.org/geoiplookup"></script>' );
return true;
};