Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -1,9 +1,15 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class CodeRevision { |
5 | | - public $mRepoId, $mRepo, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath; |
6 | 5 | |
7 | 6 | /** |
| 7 | + * @var CodeRepository |
| 8 | + */ |
| 9 | + public $mRepo; |
| 10 | + |
| 11 | + public $mRepoId, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath; |
| 12 | + |
| 13 | + /** |
8 | 14 | * @static |
9 | 15 | * @param CodeRepository $repo |
10 | 16 | * @param $data |
— | — | @@ -128,6 +134,7 @@ |
129 | 135 | * Like getId(), but returns the result as a string, including prefix, |
130 | 136 | * i.e. "r123" instead of 123. |
131 | 137 | * @param $id |
| 138 | + * @return String |
132 | 139 | */ |
133 | 140 | public function getIdString( $id = null ) { |
134 | 141 | if ( $id === null ) { |
— | — | @@ -197,7 +204,7 @@ |
198 | 205 | } |
199 | 206 | |
200 | 207 | /** |
201 | | - * @return |
| 208 | + * @return String |
202 | 209 | */ |
203 | 210 | public function getCommonPath() { |
204 | 211 | return $this->mCommonPath; |
— | — | @@ -497,7 +504,7 @@ |
498 | 505 | } |
499 | 506 | |
500 | 507 | /** |
501 | | - * @return |
| 508 | + * @return ResultWrapper |
502 | 509 | */ |
503 | 510 | public function getModifiedPaths() { |
504 | 511 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/extensions/CodeReview/backend/CodeRepository.php |
— | — | @@ -403,7 +403,7 @@ |
404 | 404 | return false; |
405 | 405 | } |
406 | 406 | |
407 | | - /* |
| 407 | + /** |
408 | 408 | * Link the $author to the wikiuser $user |
409 | 409 | * @param $author String |
410 | 410 | * @param $user User |
— | — | @@ -442,7 +442,7 @@ |
443 | 443 | return ( $dbw->affectedRows() > 0 ); |
444 | 444 | } |
445 | 445 | |
446 | | - /* |
| 446 | + /** |
447 | 447 | * Remove local user links for $author |
448 | 448 | * @param string $author |
449 | 449 | * @return bool success |
— | — | @@ -461,9 +461,10 @@ |
462 | 462 | return ( $dbw->affectedRows() > 0 ); |
463 | 463 | } |
464 | 464 | |
465 | | - /* |
| 465 | + /** |
466 | 466 | * returns a User object if $author has a wikiuser associated, |
467 | 467 | * or false |
| 468 | + * @return User|bool |
468 | 469 | */ |
469 | 470 | public function authorWikiUser( $author ) { |
470 | 471 | if ( isset( self::$userLinks[$author] ) ) |
— | — | @@ -491,7 +492,7 @@ |
492 | 493 | return self::$userLinks[$author] = $res; |
493 | 494 | } |
494 | 495 | |
495 | | - /* |
| 496 | + /** |
496 | 497 | * returns an author name if $name wikiuser has an author associated, |
497 | 498 | * or false |
498 | 499 | */ |
Index: trunk/extensions/CodeReview/backend/CodePropChange.php |
— | — | @@ -1,6 +1,9 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class CodePropChange { |
| 5 | + |
| 6 | + public $attrib, $removed, $added, $user, $userText, $timestamp; |
| 7 | + |
5 | 8 | function __construct( $rev ) { |
6 | 9 | $this->rev = $rev; |
7 | 10 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php |
— | — | @@ -517,6 +517,10 @@ |
518 | 518 | return "<tr class='$class'><td>$checkbox</td><td>$user</td><td>$flag</td><td>$date</td></tr>"; |
519 | 519 | } |
520 | 520 | |
| 521 | + /** |
| 522 | + * @param $comment CodeComment |
| 523 | + * @return string |
| 524 | + */ |
521 | 525 | protected function formatCommentInline( $comment ) { |
522 | 526 | if ( $comment->id === $this->mReplyTarget ) { |
523 | 527 | return $this->formatComment( $comment, |
— | — | @@ -526,6 +530,10 @@ |
527 | 531 | } |
528 | 532 | } |
529 | 533 | |
| 534 | + /** |
| 535 | + * @param $change CodePropChange |
| 536 | + * @return string |
| 537 | + */ |
530 | 538 | protected function formatChangeInline( $change ) { |
531 | 539 | global $wgLang; |
532 | 540 | $revId = $change->rev->getIdString(); |
— | — | @@ -598,6 +606,11 @@ |
599 | 607 | return $this->formatComment( $comment ); |
600 | 608 | } |
601 | 609 | |
| 610 | + /** |
| 611 | + * @param $comment CodeComment |
| 612 | + * @param string $replyForm |
| 613 | + * @return string |
| 614 | + */ |
602 | 615 | protected function formatComment( $comment, $replyForm = '' ) { |
603 | 616 | global $wgOut, $wgLang; |
604 | 617 | $linker = new CodeCommentLinkerWiki( $this->mRepo ); |