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

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

Improve some parameter docs

Change-Id: I927017cbb957e17a4e383f61aa24512a64b17d91
---
M composer.json
M includes/GlobalBlock.php
M includes/GlobalBlocking.class.php
M includes/GlobalBlockingHooks.php
M includes/api/ApiGlobalBlock.php
M includes/api/ApiQueryGlobalBlocks.php
M phpcs.xml
7 files changed, 31 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking 
refs/changes/26/370826/1

diff --git a/composer.json b/composer.json
index d368985..c0f3175 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
        "scripts": {
                "fix": "phpcbf",
                "test": [
-                       "parallel-lint . --exclude vendor",
+                       "parallel-lint . --exclude vendor --exclude 
node_modules",
                        "phpcs -p -s"
                ]
        }
diff --git a/includes/GlobalBlock.php b/includes/GlobalBlock.php
index 60a78d8..46f1ded 100644
--- a/includes/GlobalBlock.php
+++ b/includes/GlobalBlock.php
@@ -18,7 +18,7 @@
        }
 
        /**
-        * {@inheritdoc}
+        * @inheritDoc
         */
        public function getPermissionsError( IContextSource $context ) {
                return $this->error;
diff --git a/includes/GlobalBlocking.class.php 
b/includes/GlobalBlocking.class.php
index 3a75bff..c491dd4 100644
--- a/includes/GlobalBlocking.class.php
+++ b/includes/GlobalBlocking.class.php
@@ -7,8 +7,8 @@
  */
 class GlobalBlocking {
        /**
-        * @param $user User
-        * @param $ip string
+        * @param User $user
+        * @param string $ip
         * @return Block|null
         * @throws MWException
         */
@@ -24,8 +24,8 @@
        }
 
        /**
-        * @param $user User
-        * @param $ip string
+        * @param User $user
+        * @param string $ip
         * @return array empty or a message key with parameters
         * @throws MWException
         */
@@ -35,8 +35,8 @@
        }
 
        /**
-        * @param $user User
-        * @param $ip string
+        * @param User $user
+        * @param string $ip
         * @return array ['block' => DB row, 'error' => empty or a message key 
with parameters]
         * @throws MWException
         */
@@ -150,7 +150,7 @@
        /**
         * Get a block
         * @param string $ip The IP address to be checked
-        * @param boolean $anon Get anon blocks only
+        * @param bool $anon Get anon blocks only
         * @return object The block
         */
        static function getGlobalBlockingBlock( $ip, $anon ) {
@@ -195,7 +195,7 @@
        /**
         * Check an array of IPs for a block on any
         * @param array $ips The Array of IP addresses to be checked
-        * @param boolean $anon Get anon blocks only
+        * @param bool $anon Get anon blocks only
         * @return array of applicable blocks
         */
        static function checkIpsForBlock( $ips, $anon ) {
@@ -313,8 +313,8 @@
        }
 
        /**
-        * @param $id null|int
-        * @param $address null|string
+        * @param null|int $id
+        * @param null|string $address
         * @return array|bool
         * @throws Exception
         */
@@ -346,7 +346,7 @@
        }
 
        /**
-        * @param $block_ip string
+        * @param string $block_ip
         * @return array|bool
         */
        static function getWhitelistInfoByIP( $block_ip ) {
@@ -354,8 +354,8 @@
        }
 
        /**
-        * @param $wiki_id
-        * @param $user string
+        * @param string $wiki_id
+        * @param string $user
         * @return string
         */
        static function maybeLinkUserpage( $wiki_id, $user ) {
diff --git a/includes/GlobalBlockingHooks.php b/includes/GlobalBlockingHooks.php
index e2c012d..2249dd5 100644
--- a/includes/GlobalBlockingHooks.php
+++ b/includes/GlobalBlockingHooks.php
@@ -46,10 +46,10 @@
        }
 
        /**
-        * @param Title $title
-        * @param User $user
+        * @param Title &$title
+        * @param User &$user
         * @param string $action
-        * @param mixed $result
+        * @param mixed &$result
         *
         * @return bool
         */
@@ -76,10 +76,10 @@
        }
 
        /**
-        * @param User $user
+        * @param User &$user
         * @param string $ip
-        * @param bool $blocked
-        * @param Block|null $block
+        * @param bool &$blocked
+        * @param Block|null &$block
         *
         * @return bool
         */
@@ -93,9 +93,9 @@
        }
 
        /**
-        * @param $users
-        * @param $data
-        * @param $error
+        * @param array &$users
+        * @param array $data
+        * @param string &$error
         *
         * @return bool
         */
@@ -111,7 +111,7 @@
 
        /**
         * Creates a link to the global block log
-        * @param array $msg Message with a link to the global block log
+        * @param array &$msg Message with a link to the global block log
         * @param string $ip The IP address to be checked
         *
         * @return bool true
@@ -172,7 +172,7 @@
        }
 
        /**
-        * @param array $updateFields
+        * @param array &$updateFields
         *
         * @return bool
         */
@@ -184,7 +184,7 @@
 
        /**
         * So users can just type in a username for target and it'll work
-        * @param array $types
+        * @param array &$types
         * @return bool
         */
        public static function onGetLogTypesOnUser( array &$types ) {
diff --git a/includes/api/ApiGlobalBlock.php b/includes/api/ApiGlobalBlock.php
index ed4ee3d..6e3ab68 100644
--- a/includes/api/ApiGlobalBlock.php
+++ b/includes/api/ApiGlobalBlock.php
@@ -109,6 +109,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/includes/api/ApiQueryGlobalBlocks.php 
b/includes/api/ApiQueryGlobalBlocks.php
index 35c608c..75b3412 100644
--- a/includes/api/ApiQueryGlobalBlocks.php
+++ b/includes/api/ApiQueryGlobalBlocks.php
@@ -234,6 +234,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/phpcs.xml b/phpcs.xml
index a88a38c..29fb5ab 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,19 +2,14 @@
 <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.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
        </rule>
        <rule ref="Generic.Files.LineLength">
-               <exclude-pattern>GlobalBlocking.alias.php</exclude-pattern>
+               <exclude-pattern>GlobalBlocking\.alias\.php</exclude-pattern>
        </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/370826
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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