r108741 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108740‎ | r108741 | r108742 >
Date:19:03, 12 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Documentation

Wrap some long lines
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -38,18 +38,29 @@
3939 */
4040 private $performedAction = 'nosuchaction';
4141
 42+ /**
 43+ * @param $x null|WebRequest
 44+ * @return WebRequest
 45+ */
4246 public function request( WebRequest $x = null ) {
4347 $old = $this->context->getRequest();
4448 $this->context->setRequest( $x );
4549 return $old;
4650 }
4751
 52+ /**
 53+ * @param $x null|OutputPage
 54+ * @return OutputPage
 55+ */
4856 public function output( OutputPage $x = null ) {
4957 $old = $this->context->getOutput();
5058 $this->context->setOutput( $x );
5159 return $old;
5260 }
5361
 62+ /**
 63+ * @param IContextSource|null $context
 64+ */
5465 public function __construct( IContextSource $context = null ) {
5566 if ( !$context ) {
5667 $context = RequestContext::getMain();
@@ -577,6 +588,7 @@
578589 /**
579590 * Checks if the request should abort due to a lagged server,
580591 * for given maxlag parameter.
 592+ * @return bool
581593 */
582594 private function checkMaxLag() {
583595 global $wgShowHostnames;
Index: trunk/phase3/includes/ChangesList.php
@@ -259,7 +259,6 @@
260260 * @param $s
261261 * @param $rc RecentChange
262262 * @param $unpatrolled
263 - * @return void
264263 */
265264 public function insertDiffHist( &$s, &$rc, $unpatrolled ) {
266265 # Diff link
@@ -304,7 +303,6 @@
305304 * @param $rc RecentChange
306305 * @param $unpatrolled
307306 * @param $watched
308 - * @return void
309307 */
310308 public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
311309 # If it's a new article, there is no diff link, but if it hasn't been
@@ -340,7 +338,6 @@
341339 /**
342340 * @param $s
343341 * @param $rc RecentChange
344 - * @return void
345342 */
346343 public function insertTimestamp( &$s, $rc ) {
347344 $s .= $this->message['semicolon-separator'] .
@@ -355,12 +352,14 @@
356353 if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
357354 $s .= ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
358355 } else {
359 - $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
 356+ $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'],
 357+ $rc->mAttribs['rc_user_text'] );
360358 $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
361359 }
362360 }
363361
364 - /** insert a formatted action
 362+ /**
 363+ * insert a formatted action
365364 *
366365 * @param $rc RecentChange
367366 */
@@ -436,6 +435,11 @@
437436 }
438437 }
439438
 439+ /**
 440+ * @param $link string
 441+ * @param $watched bool
 442+ * @return string
 443+ */
440444 protected function maybeWatchedLink( $link, $watched = false ) {
441445 if( $watched ) {
442446 return '<strong class="mw-watched">' . $link . '</strong>';
@@ -607,6 +611,9 @@
608612 * Generate a list of changes using an Enhanced system (uses javascript).
609613 */
610614 class EnhancedChangesList extends ChangesList {
 615+
 616+ protected $rc_cache;
 617+
611618 /**
612619 * Add the JavaScript file for enhanced changeslist
613620 * @return String
@@ -779,9 +786,11 @@
780787 # Add the namespace and title of the block as part of the class
781788 if ( $block[0]->mAttribs['rc_log_type'] ) {
782789 # Log entry
783 - $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] );
 790+ $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-'
 791+ . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] );
784792 } else {
785 - $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
 793+ $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns'
 794+ . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
786795 }
787796 $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
788797 Html::openElement( 'tr' );
@@ -1094,9 +1103,11 @@
10951104 $logType = $rcObj->mAttribs['rc_log_type'];
10961105 if( $logType ) {
10971106 # Log entry
1098 - $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType . '-' . $rcObj->mAttribs['rc_title'] );
 1107+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-'
 1108+ . $logType . '-' . $rcObj->mAttribs['rc_title'] );
10991109 } else {
1100 - $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
 1110+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' .
 1111+ $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
11011112 }
11021113 $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
11031114 Html::openElement( 'tr' );
@@ -1190,6 +1201,7 @@
11911202 /**
11921203 * Returns text for the end of RC
11931204 * If enhanced RC is in use, returns pretty much all the text
 1205+ * @return string
11941206 */
11951207 public function endRecentChangesList() {
11961208 return $this->recentChangesBlock() . parent::endRecentChangesList();

Status & tagging log