jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370759 )

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


Improve some parameter docs

Change-Id: I62977ec4eb07f2b166cc5460172edfbc3612e75b
---
M CheckUser.hooks.php
M CheckUserEncryptedData.php
M api/ApiQueryCheckUser.php
M api/ApiQueryCheckUserLog.php
M phpcs.xml
M specials/SpecialCheckUser.php
6 files changed, 23 insertions(+), 23 deletions(-)

Approvals:
  Huji: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php
index 9b4efa3..a570d4f 100755
--- a/CheckUser.hooks.php
+++ b/CheckUser.hooks.php
@@ -204,7 +204,7 @@
         * Saves user data into the cu_changes table
         *
         * @param User $user
-        * @param boolean $autocreated
+        * @param bool $autocreated
         * @return true
         */
        public static function onLocalUserCreated( User $user, $autocreated ) {
@@ -215,8 +215,8 @@
        }
 
        /**
-        * @param $user User
-        * @param $actiontext string
+        * @param User $user
+        * @param string $actiontext
         * @return bool
         */
        protected static function logUserAccountCreation( User $user, 
$actiontext ) {
@@ -258,6 +258,7 @@
 
        /**
         * Hook function to prune data from the cu_changes table
+        * @return true
         */
        public static function maybePruneIPData() {
                # Every 50th edit, prune the checkuser changes table.
@@ -406,7 +407,7 @@
        /**
         * Tell the parser test engine to create a stub cu_changes table,
         * or temporary pages won't save correctly during the test run.
-        * @param array $tables
+        * @param array &$tables
         * @return bool
         */
        public static function checkUserParserTestTables( &$tables ) {
@@ -418,9 +419,9 @@
         * Add a link to Special:CheckUser and Special:CheckUserLog
         * on Special:Contributions/<username> for
         * privileged users.
-        * @param $id Integer: user ID
-        * @param $nt Title: user page title
-        * @param $links array: tool links
+        * @param int $id User ID
+        * @param Title $nt User page title
+        * @param array &$links Tool links
         * @return true
         */
        public static function checkUserContributionsLinks( $id, $nt, &$links ) 
{
diff --git a/CheckUserEncryptedData.php b/CheckUserEncryptedData.php
index 04256ae..eede1d6 100644
--- a/CheckUserEncryptedData.php
+++ b/CheckUserEncryptedData.php
@@ -19,8 +19,9 @@
        /**
         * Create an EncryptedData object from
         *
-        * @param $data Mixed: data/object to be encryted
-        * @param $publicKey: public key for encryption
+        * @param mixed $data Data/object to be encryted
+        * @param string $publicKey Public key for encryption
+        * @param string $algorithmName
         */
        public function __construct( $data, $publicKey, $algorithmName = 'rc4' 
) {
                $this->keyHash = crc32( $publicKey );
@@ -31,8 +32,9 @@
        /**
         * Decrypt the text in this object
         *
-        * @param $privateKey String with ascii-armored block, or the return of 
openssl_get_privatekey
-        * @return String plaintext
+        * @param string $privateKey String with ascii-armored block,
+        *   or the return of openssl_get_privatekey
+        * @return string plaintext
         */
        public function getPlaintext( $privateKey ) {
                $result = openssl_open(
@@ -53,8 +55,9 @@
        /**
         * Encrypt data with a public key
         *
-        * @param $data String
-        * @param $publicKey String with ascii-armored block, or the return of 
openssl_get_publickey
+        * @param string $data
+        * @param string $publicKey String with ascii-armored block,
+        *   or the return of openssl_get_publickey
         */
        private function encryptData( $data, $publicKey ) {
                openssl_seal( $data, $encryptedString, $envelopeKeys, [ 
$publicKey ], $this->algName );
diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php
index 40815c3..de9d53f 100644
--- a/api/ApiQueryCheckUser.php
+++ b/api/ApiQueryCheckUser.php
@@ -278,6 +278,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/api/ApiQueryCheckUserLog.php b/api/ApiQueryCheckUserLog.php
index 9ae7319..9b511d4 100644
--- a/api/ApiQueryCheckUserLog.php
+++ b/api/ApiQueryCheckUserLog.php
@@ -120,6 +120,7 @@
 
        /**
         * @see ApiBase::getExamplesMessages()
+        * @return array
         */
        protected function getExamplesMessages() {
                return [
diff --git a/phpcs.xml b/phpcs.xml
index 26e39d0..a5ee126 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,10 +2,6 @@
 <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.NamingConventions.LowerCamelFunctionsName.FunctionName" />
@@ -13,11 +9,9 @@
                <exclude 
name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures"
 />
        </rule>
        <rule ref="Generic.Files.LineLength">
-               <exclude-pattern>CheckUser.alias.php</exclude-pattern>
+               <exclude-pattern>CheckUser\.alias\.php</exclude-pattern>
        </rule>
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
        <arg name="encoding" value="UTF-8" />
-       <exclude-pattern>vendor</exclude-pattern>
-       <exclude-pattern>node_modules</exclude-pattern>
 </ruleset>
diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index 952f23e..cfc006d 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -400,7 +400,7 @@
         * Give a "no matches found for X" message.
         * If $checkLast, then mention the last edit by this user or IP.
         *
-        * @param $userName
+        * @param string $userName
         * @param bool $checkLast
         * @return string
         */
@@ -1241,8 +1241,8 @@
        }
 
        /**
-        * @param $ip
-        * @param $userId
+        * @param string $ip
+        * @param int $userId
         * @param User $user
         * @return array
         */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62977ec4eb07f2b166cc5460172edfbc3612e75b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Huji <huji.h...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to