From 4530507815c5c482e930f16a3bb7708b345b1121 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 19 Feb 2011 21:56:54 +0000 Subject: [PATCH] More function documentation --- includes/job/DoubleRedirectJob.php | 5 +++++ includes/job/JobQueue.php | 7 ++++++- includes/revisiondelete/RevisionDelete.php | 12 ++++++++++++ includes/revisiondelete/RevisionDeleteAbstracts.php | 10 ++++++++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/includes/job/DoubleRedirectJob.php b/includes/job/DoubleRedirectJob.php index 3b4b01883c..dd63a85b8e 100644 --- a/includes/job/DoubleRedirectJob.php +++ b/includes/job/DoubleRedirectJob.php @@ -13,6 +13,10 @@ */ class DoubleRedirectJob extends Job { var $reason, $redirTitle, $destTitleText; + + /** + * @var User + */ static $user; /** @@ -53,6 +57,7 @@ class DoubleRedirectJob extends Job { } Job::batchInsert( $jobs ); } + function __construct( $title, $params = false, $id = 0 ) { parent::__construct( 'fixDoubleRedirect', $title, $params, $id ); $this->reason = $params['reason']; diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php index 60b35cae8c..25702847e7 100644 --- a/includes/job/JobQueue.php +++ b/includes/job/JobQueue.php @@ -16,8 +16,13 @@ if ( !defined( 'MEDIAWIKI' ) ) { * @ingroup JobQueue */ abstract class Job { + + /** + * @var Title + */ + var $title; + var $command, - $title, $params, $id, $removeDuplicates, diff --git a/includes/revisiondelete/RevisionDelete.php b/includes/revisiondelete/RevisionDelete.php index 00afb0539b..5a2b043562 100644 --- a/includes/revisiondelete/RevisionDelete.php +++ b/includes/revisiondelete/RevisionDelete.php @@ -10,6 +10,10 @@ class RevDel_RevisionList extends RevDel_List { var $authorIdField = 'rev_user'; var $authorNameField = 'rev_user_text'; + /** + * @param $db DatabaseBase + * @return mixed + */ public function doQuery( $db ) { $ids = array_map( 'intval', $this->ids ); return $db->select( array('revision','page'), '*', @@ -186,6 +190,10 @@ class RevDel_ArchiveList extends RevDel_RevisionList { var $authorIdField = 'ar_user'; var $authorNameField = 'ar_user_text'; + /** + * @param $db DatabaseBase + * @return mixed + */ public function doQuery( $db ) { $timestamps = array(); foreach ( $this->ids as $id ) { @@ -348,6 +356,10 @@ class RevDel_FileList extends RevDel_List { * Item class for an oldimage table row */ class RevDel_FileItem extends RevDel_Item { + + /** + * @var File + */ var $file; public function __construct( $list, $row ) { diff --git a/includes/revisiondelete/RevisionDeleteAbstracts.php b/includes/revisiondelete/RevisionDeleteAbstracts.php index 073c25ba12..d57b87960e 100644 --- a/includes/revisiondelete/RevisionDeleteAbstracts.php +++ b/includes/revisiondelete/RevisionDeleteAbstracts.php @@ -4,7 +4,13 @@ * Abstract base class for a list of deletable items */ abstract class RevDel_List { - var $special, $title, $ids, $res, $current; + + /** + * @var Title + */ + var $title; + + var $special, $ids, $res, $current; var $type = null; // override this var $idField = null; // override this var $dateField = false; // override this @@ -329,7 +335,7 @@ abstract class RevDel_List { /** * Do the DB query to iterate through the objects. - * @param $db Database object to use for the query + * @param $db DatabaseBase object to use for the query */ abstract public function doQuery( $db ); -- 2.20.1