[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Improve some parameter docs

2017-08-10 Thread jenkins-bot (Code Review)
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/ 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 

[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Improve some parameter docs

2017-08-08 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser 
refs/changes/59/370759/1

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/ 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
+++