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

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

Improve some parameter docs

Change-Id: I103687e033c4696339ec618db08fac1fd1e1268b
---
M ApiWikiLove.php
M WikiLove.hooks.php
M phpcs.xml
3 files changed, 18 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLove 
refs/changes/61/382961/1

diff --git a/ApiWikiLove.php b/ApiWikiLove.php
index b498628..86569f9 100644
--- a/ApiWikiLove.php
+++ b/ApiWikiLove.php
@@ -95,11 +95,11 @@
        }
 
        /**
-        * @param $talk Title
-        * @param $subject
-        * @param $message
-        * @param $type
-        * @param $email
+        * @param Title $talk
+        * @param string $subject
+        * @param string $message
+        * @param string $type
+        * @param string $email
         * @return void
         */
        private function saveInDb( $talk, $subject, $message, $type, $email ) {
@@ -133,10 +133,10 @@
        }
 
        /**
-        * @param $talk Title
-        * @param $subject string
-        * @param $text string
-        * @param $token string
+        * @param Title $talk
+        * @param string $subject
+        * @param string $text
+        * @param string $token
         */
        private function emailUser( $talk, $subject, $text, $token ) {
                $context = new DerivativeContext( $this->getContext() );
@@ -193,9 +193,7 @@
                return true;
        }
 
-       /**
-        * @see ApiBase::getExamplesMessages()
-        */
+       /** @inheritDoc */
        protected function getExamplesMessages() {
                return [
                        
'action=wikilove&title=User:Dummy&text=Love&subject=Hi&token=123ABC'
diff --git a/WikiLove.hooks.php b/WikiLove.hooks.php
index ab1dac0..c33c8da 100644
--- a/WikiLove.hooks.php
+++ b/WikiLove.hooks.php
@@ -28,7 +28,7 @@
         * Add the preference in the user preferences with the GetPreferences 
hook.
         *
         * @param User $user
-        * @param array $preferences
+        * @param array &$preferences
         */
        public static function onGetPreferences( $user, &$preferences ) {
                global $wgWikiLoveGlobal;
@@ -46,6 +46,7 @@
         *
         * @param OutputPage $out
         * @param Skin $skin
+        * @return true
         */
        public static function onBeforePageDisplay( $out, $skin ) {
                global $wgWikiLoveGlobal;
@@ -66,7 +67,7 @@
        /**
         * Export page/user specific WikiLove variables to JS
         *
-        * @param array $vars
+        * @param array &$vars
         */
        public static function onMakeGlobalVariablesScript( &$vars ) {
                if ( self::$recipient !== null ) {
@@ -81,8 +82,8 @@
        /**
         * Add a tab or an icon the new way (MediaWiki 1.18+)
         *
-        * @param SkinTemplate $skin
-        * @param array $links Navigation links
+        * @param SkinTemplate &$skin
+        * @param array &$links Navigation links
         */
        public static function onSkinTemplateNavigation( &$skin, &$links ) {
                if ( self::showIcon( $skin ) ) {
@@ -192,7 +193,7 @@
         *
         * @see https://www.mediawiki.org/wiki/Manual:Hooks/ListDefinedTags
         * @see https://www.mediawiki.org/wiki/Manual:Hooks/ChangeTagsListActive
-        * @param array $tags
+        * @param array &$tags
         */
        public static function onListDefinedTags( &$tags ) {
                $tags[] = 'wikilove';
@@ -201,7 +202,7 @@
        /**
         * Tables that Extension:UserMerge needs to update
         *
-        * @param array $updateFields
+        * @param array &$updateFields
         */
        public static function onUserMergeAccountFields( array &$updateFields ) 
{
                global $wgWikiLoveLogging;
diff --git a/phpcs.xml b/phpcs.xml
index 5484627..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.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>
-       <exclude-pattern>node_modules</exclude-pattern>
+       <arg name="encoding" value="UTF-8" />
 </ruleset>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I103687e033c4696339ec618db08fac1fd1e1268b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLove
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