Improve some parameter docs

Change-Id: Icd8fd55cf1a4a83a6f674038e098b9be8257dc0c
This commit is contained in:
Umherirrender
2017-10-07 16:54:28 +02:00
parent 5de4ddb992
commit 7761a9e60b
6 changed files with 20 additions and 17 deletions

View File

@@ -19,7 +19,10 @@
*/
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() {
define( 'ULS_VERSION', '2017-07-25' );
}
@@ -88,6 +91,8 @@ class UniversalLanguageSelectorHooks {
* user account is new.
*
* To be removed once no longer needed.
* @param User $user
* @param bool $autoCreate
*/
public static function onLocalUserCreated( User $user, $autoCreate ) {
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.
* @param ResourceLoader $resourceLoader
* @return bool
@@ -161,6 +166,9 @@ class UniversalLanguageSelectorHooks {
/**
* Add some tabs for navigation for users who do not use Ajax interface.
* Hook: PersonalUrls
* @param array &$personal_urls
* @param string &$title
* @return true
*/
public static function addPersonalBarTrigger( array &$personal_urls, &$title ) {
global $wgULSPosition;
@@ -219,7 +227,7 @@ class UniversalLanguageSelectorHooks {
/**
* Hook to UserGetLanguageObject
* @param User $user
* @param string $code
* @param string &$code
* @param IContextSource $context
* @return bool
*/
@@ -292,7 +300,7 @@ class UniversalLanguageSelectorHooks {
/**
* Hook: ResourceLoaderGetConfigVars
* @param array $vars
* @param array &$vars
* @return bool
*/
public static function addConfig( &$vars ) {
@@ -341,7 +349,7 @@ class UniversalLanguageSelectorHooks {
/**
* Hook: MakeGlobalVariablesScript
* @param array $vars
* @param array &$vars
* @param OutputPage $out
* @return bool
*/

View File

@@ -46,7 +46,7 @@ class ApiLanguageSearch extends ApiBase {
}
/**
* @see ApiBase::getExamplesMessages()
* @inheritDoc
*/
protected function getExamplesMessages() {
return [

View File

@@ -59,7 +59,7 @@ class ApiULSLocalization extends ApiBase {
}
/**
* @see ApiBase::getExamplesMessages()
* @inheritDoc
*/
protected function getExamplesMessages() {
return [
@@ -70,8 +70,8 @@ class ApiULSLocalization extends ApiBase {
];
}
// Try to scare people away from using this externally
public function isInternal() {
// Try to scare people away from using this externally
return true;
}
}

View File

@@ -60,7 +60,7 @@ class LanguageNameSearch {
/**
* Get the code point of first letter of string
*
* @param $str string
* @param string $str
* @return int Code point of first letter of string
*/
public static function getCodepoint( $str ) {
@@ -104,8 +104,8 @@ class LanguageNameSearch {
/**
* Calculate the Levenshtein distance between two strings
* @param $str1
* @param $str2
* @param string $str1
* @param string $str2
* @return int
*/
public static function levenshteinDistance( $str1, $str2 ) {

View File

@@ -41,7 +41,7 @@ class ResourceLoaderULSModule extends ResourceLoaderModule {
}
/**
* @param $context ResourceLoaderContext
* @param ResourceLoaderContext $context
* @return string JavaScript code
*/
public function getScript( ResourceLoaderContext $context ) {

View File

@@ -2,11 +2,6 @@
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<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.Commenting.FunctionComment.MissingDocumentationPublic" />
</rule>