[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Restore default MediaWiki codesniffer configuration
Jdlrobson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365042 ) Change subject: Restore default MediaWiki codesniffer configuration .. Restore default MediaWiki codesniffer configuration Changes: - re-enabled all sniffs - fixed code to meet MW code standards Bug: T170589 Depends-On: Ib7f0bd15dd0a9255e1e5140907e800478b658b92 Change-Id: Idb08a3e105226877804a84b120c70e5defa7398c --- M includes/FooterHooks.php M includes/Hooks.php M includes/ResourceLoaderMuhoganModule.php M includes/SidebarHooks.php M phpcs.xml 5 files changed, 21 insertions(+), 18 deletions(-) Approvals: jenkins-bot: Verified Phuedx: Looks good to me, approved diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php index 9e9185d..2a76369 100644 --- a/includes/FooterHooks.php +++ b/includes/FooterHooks.php @@ -19,8 +19,8 @@ * Sets the value of the wgRelatedArticles global variable * to the list of related articles in the cached parser output. * -* @param array $vars -* @param OutputPage $out +* @param array &$vars variables to be added into the output of OutputPage::headElement. +* @param OutputPage $out OutputPage instance calling the hook * @return boolean Always true */ public static function onMakeGlobalVariablesScript( &$vars, OutputPage $out ) { @@ -100,8 +100,8 @@ * The feature is allowed on the skin (see isReadMoreAllowedOnSkin() above) * * -* @param OutputPage $out -* @param Skin $skin +* @param OutputPage $out The OutputPage object +* @param Skin $skin Skin object that will be used to generate the page * @return boolean Always true */ public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) { @@ -137,7 +137,7 @@ * If the module has already been registered in * onResourceLoaderRegisterModules, then it is overwritten. * -* @param array $schemas The schemas currently registered with the EventLogging +* @param array &$schemas The schemas currently registered with the EventLogging * extension * @return bool Always true */ @@ -152,7 +152,7 @@ * ResourceLoaderGetConfigVars hook handler for setting a config variable * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars * -* @param array $vars +* @param array &$vars Array of variables to be added into the output of the startup module. * @return boolean */ public static function onResourceLoaderGetConfigVars( &$vars ) { diff --git a/includes/Hooks.php b/includes/Hooks.php index 8362df4..e64164d 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -14,7 +14,7 @@ * Registers the related parser function (see * {@see Hooks::onFuncRelated}). * -* @param Parser $parser +* @param Parser &$parser Paser object * @return boolean Always true */ public static function onParserFirstCallInit( Parser &$parser ) { @@ -32,7 +32,7 @@ * to store it as a page prop in the database, only in the cache. * * @todo Test for uniqueness -* @param Parser $parser +* @param Parser $parser Parser object * * @return string Always '' */ @@ -62,8 +62,8 @@ * The list of related pages will be retrieved using * ParserOutput#getExtensionData. * -* @param OutputPage $out -* @param ParserOutput $parserOutput +* @param OutputPage &$out the OutputPage object +* @param ParserOutput $parserOutput ParserOutput object * @return boolean Always true */ public static function onOutputPageParserOutput( OutputPage &$out, ParserOutput $parserOutput ) { @@ -80,8 +80,8 @@ * Register QUnit tests. * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules * -* @param array $modules -* @param \ResourceLoader $rl +* @param array &$modules array of javascript testing modules +* @param \ResourceLoader &$rl Resource Loader * @return bool */ public static function onResourceLoaderTestModules( &$modules, &$rl ) { diff --git a/includes/ResourceLoaderMuhoganModule.php b/includes/ResourceLoaderMuhoganModule.php index 28258e2..31f2a1a 100644 --- a/includes/ResourceLoaderMuhoganModule.php +++ b/includes/ResourceLoaderMuhoganModule.php @@ -12,6 +12,13 @@ * share the code or use mustache in MobileFrontend too. */ class ResourceLoaderMuHoganModule extends ResourceLoaderFileModule { + + /** +* Gets list of names of modules this module depends on. +* +* @param ResourceLoaderContext|null $context Resource loader context
[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Restore default MediaWiki codesniffer configuration
Pmiazga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365042 ) Change subject: Restore default MediaWiki codesniffer configuration .. Restore default MediaWiki codesniffer configuration Changes: - re-enabled all sniffs - fixed code to meet MW code standards Bug: T170589 Change-Id: Idb08a3e105226877804a84b120c70e5defa7398c --- M includes/FooterHooks.php M includes/Hooks.php M includes/ResourceLoaderMuhoganModule.php M includes/SidebarHooks.php M phpcs.xml 5 files changed, 21 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles refs/changes/42/365042/1 diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php index 5023122..d984dd2 100644 --- a/includes/FooterHooks.php +++ b/includes/FooterHooks.php @@ -19,8 +19,8 @@ * Sets the value of the wgRelatedArticles global variable * to the list of related articles in the cached parser output. * -* @param array $vars -* @param OutputPage $out +* @param array &$vars variables to be added into the output of OutputPage::headElement. +* @param OutputPage $out OutputPage instance calling the hook * @return boolean Always true */ public static function onMakeGlobalVariablesScript( &$vars, OutputPage $out ) { @@ -107,8 +107,8 @@ * The feature is allowed on the skin (see isReadMoreAllowedOnSkin() above) * * -* @param OutputPage $out -* @param Skin $skin +* @param OutputPage $out The OutputPage object +* @param Skin $skin Skin object that will be used to generate the page * @return boolean Always true */ public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) { @@ -144,7 +144,7 @@ * If the module has already been registered in * onResourceLoaderRegisterModules, then it is overwritten. * -* @param array $schemas The schemas currently registered with the EventLogging +* @param array &$schemas The schemas currently registered with the EventLogging * extension * @return bool Always true */ @@ -159,7 +159,7 @@ * ResourceLoaderGetConfigVars hook handler for setting a config variable * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars * -* @param array $vars +* @param array &$vars Array of variables to be added into the output of the startup module. * @return boolean */ public static function onResourceLoaderGetConfigVars( &$vars ) { diff --git a/includes/Hooks.php b/includes/Hooks.php index 8362df4..e64164d 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -14,7 +14,7 @@ * Registers the related parser function (see * {@see Hooks::onFuncRelated}). * -* @param Parser $parser +* @param Parser &$parser Paser object * @return boolean Always true */ public static function onParserFirstCallInit( Parser &$parser ) { @@ -32,7 +32,7 @@ * to store it as a page prop in the database, only in the cache. * * @todo Test for uniqueness -* @param Parser $parser +* @param Parser $parser Parser object * * @return string Always '' */ @@ -62,8 +62,8 @@ * The list of related pages will be retrieved using * ParserOutput#getExtensionData. * -* @param OutputPage $out -* @param ParserOutput $parserOutput +* @param OutputPage &$out the OutputPage object +* @param ParserOutput $parserOutput ParserOutput object * @return boolean Always true */ public static function onOutputPageParserOutput( OutputPage &$out, ParserOutput $parserOutput ) { @@ -80,8 +80,8 @@ * Register QUnit tests. * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules * -* @param array $modules -* @param \ResourceLoader $rl +* @param array &$modules array of javascript testing modules +* @param \ResourceLoader &$rl Resource Loader * @return bool */ public static function onResourceLoaderTestModules( &$modules, &$rl ) { diff --git a/includes/ResourceLoaderMuhoganModule.php b/includes/ResourceLoaderMuhoganModule.php index 28258e2..31f2a1a 100644 --- a/includes/ResourceLoaderMuhoganModule.php +++ b/includes/ResourceLoaderMuhoganModule.php @@ -12,6 +12,13 @@ * share the code or use mustache in MobileFrontend too. */ class ResourceLoaderMuHoganModule extends ResourceLoaderFileModule { + + /** +* Gets list of names of modules this module depends on. +* +* @param ResourceLoaderContext|null $context Resource loader context +* @return array