Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380334 )

Change subject: Improve some parameter docs
......................................................................

Improve some parameter docs

Change-Id: I2ffe6893abf6ca6a7553acfd5ccfa26361f63124
---
M TemplateData.hooks.php
M TemplateDataBlob.php
M api/ApiTemplateData.php
M phpcs.xml
4 files changed, 14 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/34/380334/1

diff --git a/TemplateData.hooks.php b/TemplateData.hooks.php
index 1b6cf8a..bff3402 100644
--- a/TemplateData.hooks.php
+++ b/TemplateData.hooks.php
@@ -9,6 +9,8 @@
 class TemplateDataHooks {
        /**
         * Register parser hooks
+        * @param Parser &$parser
+        * @return bool
         */
        public static function onParserFirstCallInit( &$parser ) {
                $parser->setHook( 'templatedata', [ 'TemplateDataHooks', 
'render' ] );
@@ -17,6 +19,9 @@
 
        /**
         * Register qunit unit tests
+        * @param array &$testModules
+        * @param ResourceLoader &$resourceLoader
+        * @return bool
         */
        public static function onResourceLoaderTestModules(
                array &$testModules,
@@ -35,7 +40,7 @@
         * Conditionally register the jquery.uls.data module, in case they've 
already been
         * registered by the UniversalLanguageSelector extension or the 
VisualEditor extension.
         *
-        * @param ResourceLoader $resourceLoader
+        * @param ResourceLoader &$resourceLoader
         * @return boolean true
         */
        public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
@@ -61,11 +66,12 @@
         * @param User &$user
         * @param Content &$content
         * @param string &$summary
-        * @param $minor
+        * @param bool $minor
         * @param bool|null $watchthis
-        * @param $sectionanchor
-        * @param &$flags
+        * @param string $sectionanchor
+        * @param int &$flags
         * @param Status &$status
+        * @return bool
         */
        public static function onPageContentSave( &$page, &$user, &$content, 
&$summary, $minor,
                $watchthis, $sectionanchor, &$flags, &$status
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index c024802..b088ded 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -561,7 +561,8 @@
 
        /**
         * Normalise a InterfaceText field in the TemplateData blob.
-        * @return stdClass|string $text
+        * @param stdClass|string $text
+        * @return stdClass|string
         */
        protected static function normaliseInterfaceText( $text ) {
                if ( is_string( $text ) ) {
diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index a366846..8aa5b0f 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -155,6 +155,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/phpcs.xml b/phpcs.xml
index 649a74b..d81f486 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,16 +2,11 @@
 <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.Files.ClassMatchesFilename.NotMatch" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
-       <arg name="encoding" value="utf8" />
-       <exclude-pattern>vendor</exclude-pattern>
+       <arg name="encoding" value="UTF-8" />
 </ruleset>

-- 
To view, visit https://gerrit.wikimedia.org/r/380334
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ffe6893abf6ca6a7553acfd5ccfa26361f63124
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to