Improve some parameter docs
Change-Id: Icd8fd55cf1a4a83a6f674038e098b9be8257dc0c
This commit is contained in:
@@ -19,7 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class UniversalLanguageSelectorHooks {
|
class UniversalLanguageSelectorHooks {
|
||||||
// Used when extension registration in use which skips the main php file
|
|
||||||
|
/**
|
||||||
|
* Used when extension registration in use which skips the main php file
|
||||||
|
*/
|
||||||
public static function setVersionConstant() {
|
public static function setVersionConstant() {
|
||||||
define( 'ULS_VERSION', '2017-07-25' );
|
define( 'ULS_VERSION', '2017-07-25' );
|
||||||
}
|
}
|
||||||
@@ -88,6 +91,8 @@ class UniversalLanguageSelectorHooks {
|
|||||||
* user account is new.
|
* user account is new.
|
||||||
*
|
*
|
||||||
* To be removed once no longer needed.
|
* To be removed once no longer needed.
|
||||||
|
* @param User $user
|
||||||
|
* @param bool $autoCreate
|
||||||
*/
|
*/
|
||||||
public static function onLocalUserCreated( User $user, $autoCreate ) {
|
public static function onLocalUserCreated( User $user, $autoCreate ) {
|
||||||
if ( RequestContext::getMain()->getConfig()->get( 'ULSCompactLinksForNewAccounts' ) ) {
|
if ( RequestContext::getMain()->getConfig()->get( 'ULSCompactLinksForNewAccounts' ) ) {
|
||||||
@@ -141,7 +146,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $testModules array of javascript testing modules. 'qunit' is fed
|
* @param array &$testModules array of javascript testing modules. 'qunit' is fed
|
||||||
* using tests/qunit/QUnitTestResources.php.
|
* using tests/qunit/QUnitTestResources.php.
|
||||||
* @param ResourceLoader $resourceLoader
|
* @param ResourceLoader $resourceLoader
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -161,6 +166,9 @@ class UniversalLanguageSelectorHooks {
|
|||||||
/**
|
/**
|
||||||
* Add some tabs for navigation for users who do not use Ajax interface.
|
* Add some tabs for navigation for users who do not use Ajax interface.
|
||||||
* Hook: PersonalUrls
|
* Hook: PersonalUrls
|
||||||
|
* @param array &$personal_urls
|
||||||
|
* @param string &$title
|
||||||
|
* @return true
|
||||||
*/
|
*/
|
||||||
public static function addPersonalBarTrigger( array &$personal_urls, &$title ) {
|
public static function addPersonalBarTrigger( array &$personal_urls, &$title ) {
|
||||||
global $wgULSPosition;
|
global $wgULSPosition;
|
||||||
@@ -219,7 +227,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
/**
|
/**
|
||||||
* Hook to UserGetLanguageObject
|
* Hook to UserGetLanguageObject
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param string $code
|
* @param string &$code
|
||||||
* @param IContextSource $context
|
* @param IContextSource $context
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@@ -292,7 +300,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook: ResourceLoaderGetConfigVars
|
* Hook: ResourceLoaderGetConfigVars
|
||||||
* @param array $vars
|
* @param array &$vars
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function addConfig( &$vars ) {
|
public static function addConfig( &$vars ) {
|
||||||
@@ -341,7 +349,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook: MakeGlobalVariablesScript
|
* Hook: MakeGlobalVariablesScript
|
||||||
* @param array $vars
|
* @param array &$vars
|
||||||
* @param OutputPage $out
|
* @param OutputPage $out
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class ApiLanguageSearch extends ApiBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ApiBase::getExamplesMessages()
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
protected function getExamplesMessages() {
|
protected function getExamplesMessages() {
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class ApiULSLocalization extends ApiBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ApiBase::getExamplesMessages()
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
protected function getExamplesMessages() {
|
protected function getExamplesMessages() {
|
||||||
return [
|
return [
|
||||||
@@ -70,8 +70,8 @@ class ApiULSLocalization extends ApiBase {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to scare people away from using this externally
|
|
||||||
public function isInternal() {
|
public function isInternal() {
|
||||||
|
// Try to scare people away from using this externally
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class LanguageNameSearch {
|
|||||||
/**
|
/**
|
||||||
* Get the code point of first letter of string
|
* Get the code point of first letter of string
|
||||||
*
|
*
|
||||||
* @param $str string
|
* @param string $str
|
||||||
* @return int Code point of first letter of string
|
* @return int Code point of first letter of string
|
||||||
*/
|
*/
|
||||||
public static function getCodepoint( $str ) {
|
public static function getCodepoint( $str ) {
|
||||||
@@ -104,8 +104,8 @@ class LanguageNameSearch {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the Levenshtein distance between two strings
|
* Calculate the Levenshtein distance between two strings
|
||||||
* @param $str1
|
* @param string $str1
|
||||||
* @param $str2
|
* @param string $str2
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function levenshteinDistance( $str1, $str2 ) {
|
public static function levenshteinDistance( $str1, $str2 ) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class ResourceLoaderULSModule extends ResourceLoaderModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $context ResourceLoaderContext
|
* @param ResourceLoaderContext $context
|
||||||
* @return string JavaScript code
|
* @return string JavaScript code
|
||||||
*/
|
*/
|
||||||
public function getScript( ResourceLoaderContext $context ) {
|
public function getScript( ResourceLoaderContext $context ) {
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
|
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
|
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
|
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
|
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
|
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
|
|
||||||
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
|
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
|
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
|
||||||
</rule>
|
</rule>
|
||||||
|
|||||||
Reference in New Issue
Block a user