r61173 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61172‎ | r61173 | r61174 >
Date:16:34, 17 January 2010
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
Fix some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HistoryPage.php
@@ -24,8 +24,8 @@
2525 /**
2626 * Construct a new HistoryPage.
2727 *
28 - * @param Article $article
29 - * @returns nothing
 28+ * @param $article Article
 29+ * @return nothing
3030 */
3131 function __construct( $article ) {
3232 global $wgUser;
@@ -60,7 +60,7 @@
6161 /**
6262 * Print the history page for an article.
6363 *
64 - * @returns nothing
 64+ * @return nothing
6565 */
6666 function history() {
6767 global $wgOut, $wgRequest, $wgScript;
@@ -180,8 +180,13 @@
181181 * Fetch an array of revisions, specified by a given limit, offset and
182182 * direction. This is now only used by the feeds. It was previously
183183 * used by the main UI but that's now handled by the pager.
 184+ *
 185+ * @param $limit Integer: the limit number of revisions to get
 186+ * @param $offset Integer
 187+ * @param $direction Integer: either HistoryPage::DIR_PREV or HistoryPage::DIR_NEXT
 188+ * @return ResultWrapper
184189 */
185 - function fetchRevisions($limit, $offset, $direction) {
 190+ function fetchRevisions( $limit, $offset, $direction ) {
186191 $dbr = wfGetDB( DB_SLAVE );
187192
188193 if( $direction == HistoryPage::DIR_PREV )
@@ -207,7 +212,8 @@
208213
209214 /**
210215 * Output a subscription feed listing recent edits to this page.
211 - * @param string $type
 216+ *
 217+ * @param $type String: feed type
212218 */
213219 function feed( $type ) {
214220 global $wgFeedClasses, $wgRequest, $wgFeedLimit;
@@ -258,7 +264,7 @@
259265 * Borrows Recent Changes' feed generation functions for formatting;
260266 * includes a diff to the previous revision (if any).
261267 *
262 - * @param $row
 268+ * @param $row Object: database row
263269 * @return FeedItem
264270 */
265271 function feedItem( $row ) {
@@ -429,10 +435,11 @@
430436 /**
431437 * Creates a submit button
432438 *
433 - * @param array $attributes attributes
434 - * @return string HTML output for the submit button
 439+ * @param $message String: text of the submit button, will be escaped
 440+ * @param $attributes Array: attributes
 441+ * @return String: HTML output for the submit button
435442 */
436 - function submitButton($message, $attributes = array() ) {
 443+ function submitButton( $message, $attributes = array() ) {
437444 # Disable submit button if history has 1 revision only
438445 if( $this->getNumRows() > 1 ) {
439446 return Xml::submitButton( $message , $attributes );
@@ -446,13 +453,13 @@
447454 *
448455 * @todo document some more, and maybe clean up the code (some params redundant?)
449456 *
450 - * @param Row $row The database row corresponding to the previous line.
451 - * @param mixed $next The database row corresponding to the next line.
452 - * @param int $counter Apparently a counter of what row number we're at, counted from the top row = 1.
 457+ * @param $row Object: the database row corresponding to the previous line.
 458+ * @param $next Mixed: the database row corresponding to the next line.
 459+ * @param $counter Integer: apparently a counter of what row number we're at, counted from the top row = 1.
453460 * @param $notificationtimestamp
454 - * @param bool $latest Whether this row corresponds to the page's latest revision.
455 - * @param bool $firstInList Whether this row corresponds to the first displayed on this history page.
456 - * @return string HTML output for the row
 461+ * @param $latest Boolean: whether this row corresponds to the page's latest revision.
 462+ * @param $firstInList Boolean: whether this row corresponds to the first displayed on this history page.
 463+ * @return String: HTML output for the row
457464 */
458465 function historyLine( $row, $next, $counter = '', $notificationtimestamp = false,
459466 $latest = false, $firstInList = false )
@@ -569,8 +576,9 @@
570577
571578 /**
572579 * Create a link to view this revision of the page
573 - * @param Revision $rev
574 - * @returns string
 580+ *
 581+ * @param $rev Revision
 582+ * @return String
575583 */
576584 function revLink( $rev ) {
577585 global $wgLang;
@@ -592,9 +600,10 @@
593601
594602 /**
595603 * Create a diff-to-current link for this revision for this page
596 - * @param Revision $rev
597 - * @param Bool $latest, this is the latest revision of the page?
598 - * @returns string
 604+ *
 605+ * @param $rev Revision
 606+ * @param $latest Boolean: this is the latest revision of the page?
 607+ * @return String
599608 */
600609 function curLink( $rev, $latest ) {
601610 $cur = $this->historyPage->message['cur'];
@@ -616,10 +625,11 @@
617626
618627 /**
619628 * Create a diff-to-previous link for this revision for this page.
620 - * @param Revision $prevRev, the previous revision
621 - * @param mixed $next, the newer revision
622 - * @param int $counter, what row on the history list this is
623 - * @returns string
 629+ *
 630+ * @param $prevRev Revision: the previous revision
 631+ * @param $next Mixed: the newer revision
 632+ * @param $counter Integer: what row on the history list this is
 633+ * @return String
624634 */
625635 function lastLink( $prevRev, $next, $counter ) {
626636 $last = $this->historyPage->message['last'];
@@ -659,10 +669,10 @@
660670 /**
661671 * Create radio buttons for page history
662672 *
663 - * @param object $rev Revision
664 - * @param bool $firstInList Is this version the first one?
665 - * @param int $counter A counter of what row number we're at, counted from the top row = 1.
666 - * @return string HTML output for the radio buttons
 673+ * @param $rev Revision object
 674+ * @param $firstInList Boolean: is this version the first one?
 675+ * @param $counter Integer: a counter of what row number we're at, counted from the top row = 1.
 676+ * @return String: HTML output for the radio buttons
667677 */
668678 function diffButtons( $rev, $firstInList, $counter ) {
669679 if( $this->getNumRows() > 1 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r61181Per ^demon, follow-up r61173: remove useless "@return nothing"ialex21:02, 17 January 2010

Comments

#Comment by 😂 (talk | contribs)   18:14, 17 January 2010

Is the @return nothing really needed?

#Comment by IAlex (talk | contribs)   21:02, 17 January 2010

Done in r61181.

Status & tagging log