r80798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80797‎ | r80798 | r80799 >
Date:09:33, 23 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Addition and tweaking of method documentation
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodePropChange.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRepository.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -1,9 +1,15 @@
22 <?php
33
44 class CodeRevision {
5 - public $mRepoId, $mRepo, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath;
65
76 /**
 7+ * @var CodeRepository
 8+ */
 9+ public $mRepo;
 10+
 11+ public $mRepoId, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath;
 12+
 13+ /**
814 * @static
915 * @param CodeRepository $repo
1016 * @param $data
@@ -128,6 +134,7 @@
129135 * Like getId(), but returns the result as a string, including prefix,
130136 * i.e. "r123" instead of 123.
131137 * @param $id
 138+ * @return String
132139 */
133140 public function getIdString( $id = null ) {
134141 if ( $id === null ) {
@@ -197,7 +204,7 @@
198205 }
199206
200207 /**
201 - * @return
 208+ * @return String
202209 */
203210 public function getCommonPath() {
204211 return $this->mCommonPath;
@@ -497,7 +504,7 @@
498505 }
499506
500507 /**
501 - * @return
 508+ * @return ResultWrapper
502509 */
503510 public function getModifiedPaths() {
504511 $dbr = wfGetDB( DB_SLAVE );
Index: trunk/extensions/CodeReview/backend/CodeRepository.php
@@ -403,7 +403,7 @@
404404 return false;
405405 }
406406
407 - /*
 407+ /**
408408 * Link the $author to the wikiuser $user
409409 * @param $author String
410410 * @param $user User
@@ -442,7 +442,7 @@
443443 return ( $dbw->affectedRows() > 0 );
444444 }
445445
446 - /*
 446+ /**
447447 * Remove local user links for $author
448448 * @param string $author
449449 * @return bool success
@@ -461,9 +461,10 @@
462462 return ( $dbw->affectedRows() > 0 );
463463 }
464464
465 - /*
 465+ /**
466466 * returns a User object if $author has a wikiuser associated,
467467 * or false
 468+ * @return User|bool
468469 */
469470 public function authorWikiUser( $author ) {
470471 if ( isset( self::$userLinks[$author] ) )
@@ -491,7 +492,7 @@
492493 return self::$userLinks[$author] = $res;
493494 }
494495
495 - /*
 496+ /**
496497 * returns an author name if $name wikiuser has an author associated,
497498 * or false
498499 */
Index: trunk/extensions/CodeReview/backend/CodePropChange.php
@@ -1,6 +1,9 @@
22 <?php
33
44 class CodePropChange {
 5+
 6+ public $attrib, $removed, $added, $user, $userText, $timestamp;
 7+
58 function __construct( $rev ) {
69 $this->rev = $rev;
710 }
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -517,6 +517,10 @@
518518 return "<tr class='$class'><td>$checkbox</td><td>$user</td><td>$flag</td><td>$date</td></tr>";
519519 }
520520
 521+ /**
 522+ * @param $comment CodeComment
 523+ * @return string
 524+ */
521525 protected function formatCommentInline( $comment ) {
522526 if ( $comment->id === $this->mReplyTarget ) {
523527 return $this->formatComment( $comment,
@@ -526,6 +530,10 @@
527531 }
528532 }
529533
 534+ /**
 535+ * @param $change CodePropChange
 536+ * @return string
 537+ */
530538 protected function formatChangeInline( $change ) {
531539 global $wgLang;
532540 $revId = $change->rev->getIdString();
@@ -598,6 +606,11 @@
599607 return $this->formatComment( $comment );
600608 }
601609
 610+ /**
 611+ * @param $comment CodeComment
 612+ * @param string $replyForm
 613+ * @return string
 614+ */
602615 protected function formatComment( $comment, $replyForm = '' ) {
603616 global $wgOut, $wgLang;
604617 $linker = new CodeCommentLinkerWiki( $this->mRepo );

Status & tagging log