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

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


Improve some parameter docs

Change-Id: Ifc9967f1e0470a86e56f9d883ed13c0e55125bf3
---
M composer.json
M includes/main/Context.php
M includes/main/Store.php
M includes/pages/ListPage.php
M includes/user/Auth.php
M phpcs.xml
6 files changed, 25 insertions(+), 24 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/composer.json b/composer.json
index bf202bf..fd295f4 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/main/Context.php b/includes/main/Context.php
index 1bd6f08..ac14d06 100644
--- a/includes/main/Context.php
+++ b/includes/main/Context.php
@@ -248,7 +248,7 @@
        /**
         * Get a database object, or throw an exception if the current store 
object
         * does not support database operations.
-        * @param integer $index DB_MASTER or DB_REPLICA
+        * @param int $index DB_MASTER or DB_REPLICA
         * @return DatabaseBase
         */
        function getDB( $index = DB_MASTER ) {
diff --git a/includes/main/Store.php b/includes/main/Store.php
index 8f851cf..4934f47 100644
--- a/includes/main/Store.php
+++ b/includes/main/Store.php
@@ -35,8 +35,8 @@
 
        /**
         * Get the type of one or more SecurePoll entities.
-        * @param $ids Int
-        * @return String
+        * @param int $id
+        * @return string
         */
        function getEntityType( $id );
 
@@ -60,7 +60,7 @@
 
        /**
         * Get a database connection object.
-        * @param integer $index DB_MASTER or DB_REPLICA
+        * @param int $index DB_MASTER or DB_REPLICA
         */
        function getDB( $index = DB_MASTER );
 
diff --git a/includes/pages/ListPage.php b/includes/pages/ListPage.php
index 710670a..d3cbddc 100644
--- a/includes/pages/ListPage.php
+++ b/includes/pages/ListPage.php
@@ -10,7 +10,7 @@
 
        /**
         * Execute the subpage.
-        * @param $params array Array of subpage parameters.
+        * @param array $params Array of subpage parameters.
         */
        public function execute( $params ) {
                $out = $this->specialPage->getOutput();
@@ -132,9 +132,9 @@
 
        /**
         * The strike/unstrike backend.
-        * @param $action string strike or unstrike
-        * @param $voteId integer The vote ID
-        * @param $reason string The reason
+        * @param string $action strike or unstrike
+        * @param int $voteId The vote ID
+        * @param string $reason The reason
         */
        public function strike( $action, $voteId, $reason ) {
                $dbw = $this->context->getDB();
diff --git a/includes/user/Auth.php b/includes/user/Auth.php
index 92ea666..d9a5b53 100644
--- a/includes/user/Auth.php
+++ b/includes/user/Auth.php
@@ -19,6 +19,7 @@
         * Create an auth object of the given type
         * @param SecurePoll_Context $context
         * @param string $type
+        * @return SecurePoll_LocalAuth|SecurePoll_RemoteMWAuth
         * @throws MWException
         */
        static function factory( $context, $type ) {
@@ -49,7 +50,7 @@
        /**
         * Create a voter transparently, without user interaction.
         * Sessions authorized against local accounts are created this way.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function autoLogin( $election ) {
@@ -58,7 +59,7 @@
 
        /**
         * Create a voter on a direct request from a remote site.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function requestLogin( $election ) {
@@ -68,7 +69,7 @@
        /**
         * Get the voter associated with the current session. Returns false if
         * there is no session.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return SecurePoll_Election
         */
        function getVoterFromSession( $election ) {
@@ -105,7 +106,7 @@
         * Get a voter object with the relevant parameters.
         * If no voter exists with those parameters, a new one is created. If 
one
         * does exist already, it is returned.
-        * @param $params array
+        * @param array $params
         * @return SecurePoll_Voter
         */
        function getVoter( $params ) {
@@ -138,7 +139,7 @@
 
        /**
         * Create a voter without user interaction, and create a session for it.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function newAutoSession( $election ) {
@@ -153,7 +154,7 @@
 
        /**
         * Create a voter on an explicit request, and create a session for it.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function newRequestedSession( $election ) {
@@ -190,7 +191,7 @@
        /**
         * Create a voter transparently, without user interaction.
         * Sessions authorized against local accounts are created this way.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function autoLogin( $election ) {
@@ -210,7 +211,7 @@
 
        /**
         * Get voter parameters for a local User object.
-        * @param $user User
+        * @param User $user
         * @return array
         */
        function getUserParams( $user ) {
@@ -240,7 +241,7 @@
 
        /**
         * Get the lists a given local user belongs to
-        * @param $user User
+        * @param User $user
         * @return array
         */
        function getLists( $user ) {
@@ -260,7 +261,7 @@
 
        /**
         * Get the CentralAuth lists the user belongs to
-        * @param $user User
+        * @param User $user
         * @return array
         */
        function getCentralLists( $user ) {
@@ -287,8 +288,8 @@
 
        /**
         * Checks how many central wikis the user is blocked on
-        * @param $user User
-        * @return Integer the number of wikis the user is blocked on.
+        * @param User $user
+        * @return int the number of wikis the user is blocked on.
         */
        function getCentralBlockCount( $user ) {
                if ( ! class_exists( 'CentralAuthUser' ) ) {
@@ -327,7 +328,7 @@
 
        /**
         * Create a voter on a direct request from a remote site.
-        * @param $election SecurePoll_Election
+        * @param SecurePoll_Election $election
         * @return Status
         */
        function requestLogin( $election ) {
@@ -424,6 +425,8 @@
         * hexadecimal digits, to provide 24 bits less information than 
original token.
         * This makes discovery of the token difficult even if the hash 
function is
         * completely broken.
+        * @param string $token
+        * @return string
         */
        static function encodeToken( $token ) {
                return substr( sha1( __CLASS__ . '-' . $token ), 0, 26 );
diff --git a/phpcs.xml b/phpcs.xml
index 84c93a2..eb51749 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -25,6 +25,4 @@
        <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>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc9967f1e0470a86e56f9d883ed13c0e55125bf3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.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