jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403706 )
Change subject: Improve some parameter docs
......................................................................
Improve some parameter docs
Change-Id: I947c4e867eb68efeaeafd821597413a2fe8f6fa5
---
M .phpcs.xml
M Patroller.hooks.php
M SpecialPatroller.php
3 files changed, 22 insertions(+), 44 deletions(-)
Approvals:
Umherirrender: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.phpcs.xml b/.phpcs.xml
index bc1c593..aae442c 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
- <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.extract" />
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
@@ -10,6 +8,5 @@
</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>
diff --git a/Patroller.hooks.php b/Patroller.hooks.php
index daf23a5..b1b070c 100644
--- a/Patroller.hooks.php
+++ b/Patroller.hooks.php
@@ -14,9 +14,8 @@
/**
* Setup the database tables
*
- * @access public
- * @param class The updater
- * @return void
+ * @param DatabaseUpdater $updater The updater
+ * @return void
*/
public static function onLoadExtensionSchemaUpdates( $updater ) {
$updater->addExtensionTable( 'patrollers', __DIR__ .
'/sql/add-patrollers.sql' );
diff --git a/SpecialPatroller.php b/SpecialPatroller.php
index f10d9ba..688efcb 100644
--- a/SpecialPatroller.php
+++ b/SpecialPatroller.php
@@ -14,7 +14,7 @@
/**
* Constructor
*
- * @return void
+ * @return void
*/
public function __construct() {
parent::__construct( 'Patrol', 'patroller' );
@@ -27,9 +27,8 @@
/**
* Execution
*
- * @access public
- * @param array Parameters passed to the page
- * @return void
+ * @param array $par Parameters passed to the page
+ * @return void
*/
public function execute( $par ) {
global $wgUser, $wgRequest, $wgOut;
@@ -116,9 +115,7 @@
/**
* Produce a stub recent changes listing for a single diff.
*
- * @access private
- * @param class Diff. to show the listing for
- * @return void
+ * @param RecentChange &$edit Diff. to show the listing for
*/
private function showDiffDetails( &$edit ) {
global $wgOut;
@@ -135,9 +132,7 @@
/**
* Output a trimmed down diff view corresponding to a particular change
*
- * @access private
- * @param class Recent change to produce a diff for
- * @return void
+ * @param RecentChange &$edit Recent change to produce a diff for
*/
private function showDiff( &$edit ) {
$diff = new DifferenceEngine(
@@ -151,9 +146,7 @@
/**
* Output a bunch of controls to let the user endorse, revert and skip
changes
*
- * @access private
- * @param class RecentChange being dealt with
- * @return void
+ * @param RecentChange &$edit RecentChange being dealt with
*/
private function showControls( &$edit ) {
global $wgUser, $wgOut;
@@ -217,9 +210,8 @@
* - hasn't been patrolled
* - isn't assigned to a user
*
- * @access private
- * @param class User to suppress edits for
- * @return boolean RecentChange
+ * @param User &$user User to suppress edits for
+ * @return false|RecentChange
*/
private function fetchChange( &$user ) {
$dbr = wfGetDB( DB_REPLICA );
@@ -261,9 +253,8 @@
/**
* Fetch a particular recent change given the rc_id value
*
- * @access private
- * @param integer rc_id value of the row to fetch
- * @return boolean RecentChange
+ * @param int $rcid rc_id value of the row to fetch
+ * @return bool|RecentChange
*/
private function loadChange( $rcid ) {
$dbr = wfGetDB( DB_REPLICA );
@@ -286,9 +277,8 @@
* Assign the patrolling of a particular change, so other users don't
pull
* it up, duplicating effort
*
- * @access private
- * @param string RecentChange item to assign
- * @return boolean If rows were changed
+ * @param RecentChange &$edit RecentChange item to assign
+ * @return bool If rows were changed
*/
private function assignChange( &$edit ) {
$dbw = wfGetDB( DB_MASTER );
@@ -307,9 +297,7 @@
/**
* Remove the assignment for a particular change, to let another user
handle it
*
- * @access private
- * @param integer rc_id value
- * @return void
+ * @param int $rcid rc_id value
*
* @todo Use it or lose it
*/
@@ -328,9 +316,6 @@
* Prune old assignments from the table so edits aren't
* hidden forever because a user wandered off, and to
* keep the table size down as regards old assignments
- *
- * @access private
- * @return void
*/
private function pruneAssignments() {
$dbw = wfGetDB( DB_MASTER );
@@ -346,10 +331,9 @@
/**
* Revert a change, setting the page back to the "old" version
*
- * @access private
- * @param class RecentChange to revert
- * @param string Comment to use when reverting
- * @return boolean Change was reverted
+ * @param RecentChange &$edit RecentChange to revert
+ * @param string $comment Comment to use when reverting
+ * @return bool Change was reverted
*/
private function revert( &$edit, $comment = '' ) {
global $wgUser;
@@ -391,8 +375,7 @@
* Make a nice little drop-down box containing all the pre-defined
revert
* reasons for simplified selection
*
- * @access private
- * @return string Reasons
+ * @return string Reasons
*/
private function revertReasonsDropdown() {
$msg = wgMessage( 'patrol-reasons'
)->inContentLanguage()->text();
@@ -425,9 +408,8 @@
* Determine which of the two "revert reason" form fields to use;
* the pre-defined reasons, or the nice custom text box
*
- * @access private
- * @param class WebRequest object to test
- * @return string Revert reason
+ * @param WebRequest &$request WebRequest object to test
+ * @return string Revert reason
*/
private function revertReason( &$request ) {
$custom = $request->getText( 'wpPatrolRevertReason' );
--
To view, visit https://gerrit.wikimedia.org/r/403706
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I947c4e867eb68efeaeafd821597413a2fe8f6fa5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Patroller
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits