[MediaWiki-commits] [Gerrit] mediawiki...Patroller[master]: Improve some parameter docs
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 @@ - - @@ -10,6 +8,5 @@ . - - vendor + 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 -
[MediaWiki-commits] [Gerrit] mediawiki...Patroller[master]: Improve some parameter docs
Umherirrender has uploaded a new change for review. ( 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller refs/changes/06/403706/1 diff --git a/.phpcs.xml b/.phpcs.xml index bc1c593..aae442c 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,8 +1,6 @@ - - @@ -10,6 +8,5 @@ . - - vendor + 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..30c653e 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