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 <code>wgRelatedArticles</code> 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 <code>true</code>
*/
public static function onMakeGlobalVariablesScript( &$vars, OutputPage
$out ) {
@@ -107,8 +107,8 @@
* <li>The feature is allowed on the skin (see
isReadMoreAllowedOnSkin() above)</li>
* </ol>
*
- * @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 <code>true</code>
*/
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 <code>related</code> parser function (see
* {@see Hooks::onFuncRelated}).
*
- * @param Parser $parser
+ * @param Parser &$parser Paser object
* @return boolean Always <code>true</code>
*/
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 <code>''</code>
*/
@@ -62,8 +62,8 @@
* The list of related pages will be retrieved using
* <code>ParserOutput#getExtensionData</code>.
*
- * @param OutputPage $out
- * @param ParserOutput $parserOutput
+ * @param OutputPage &$out the OutputPage object
+ * @param ParserOutput $parserOutput ParserOutput object
* @return boolean Always <code>true</code>
*/
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 List of module names
+ */
public function getDependencies( ResourceLoaderContext $context = null
) {
$dependencies = parent::getDependencies( $context );
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
index 1bc293d..7ccaefa 100644
--- a/includes/SidebarHooks.php
+++ b/includes/SidebarHooks.php
@@ -17,8 +17,8 @@
* and adds its HTML representation to the sidebar if the ReadMore
feature
* is disabled and the beta feature is enabled by the user.
*
- * @param Skin $skin
- * @param array $bar
+ * @param Skin $skin Skin object
+ * @param array &$bar Sidebar contents
* @return boolean Always <code>true</code>
*/
public static function onSidebarBeforeOutput( Skin $skin, &$bar ) {
diff --git a/phpcs.xml b/phpcs.xml
index 785b98d..ea36036 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,10 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
--
To view, visit https://gerrit.wikimedia.org/r/365042
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb08a3e105226877804a84b120c70e5defa7398c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Pmiazga <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits