r107680 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107679‎ | r107680 | r107681 >
Date:00:21, 31 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Add braces

Fix documentation
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)
  • /trunk/phase3/maintenance/commandLine.inc (modified) (history)
  • /trunk/phase3/maintenance/runJobs.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/runJobs.php
@@ -61,16 +61,18 @@
6262 $dbw = wfGetDB( DB_MASTER );
6363 $n = 0;
6464 $conds = '';
65 - if ( $type !== false )
 65+ if ( $type !== false ) {
6666 $conds = "job_cmd = " . $dbw->addQuotes( $type );
 67+ }
6768
6869 while ( $dbw->selectField( 'job', 'job_id', $conds, 'runJobs.php' ) ) {
6970 $offset = 0;
7071 for ( ; ; ) {
7172 $job = !$type ? Job::pop( $offset ) : Job::pop_type( $type );
7273
73 - if ( !$job )
 74+ if ( !$job ) {
7475 break;
 76+ }
7577
7678 wfWaitForSlaves();
7779 $t = microtime( true );
Index: trunk/phase3/maintenance/commandLine.inc
@@ -41,8 +41,9 @@
4242 * No help, it would just be misleading since it misses custom options
4343 */
4444 protected function maybeHelp( $force = false ) {
45 - if ( !$force )
 45+ if ( !$force ) {
4646 return;
 47+ }
4748 parent::maybeHelp( true );
4849 }
4950
Index: trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php
@@ -206,7 +206,7 @@
207207 $votesLeft = count( $this->dbsByBucket[$bucket] ); // remaining DBs
208208 $quorum = floor( $votesLeft/2 + 1 ); // simple majority
209209 // Get votes for each DB, in order, until we have enough...
210 - foreach ( $this->dbsByBucket[$bucket] as $index => $lockDb ) {
 210+ foreach ( $this->dbsByBucket[$bucket] as $lockDb ) {
211211 // Check that DB is not *known* to be down
212212 if ( $this->cacheCheckFailures( $lockDb ) ) {
213213 try {
Index: trunk/phase3/includes/installer/Installer.php
@@ -1228,7 +1228,7 @@
12291229
12301230 /**
12311231 * Overridden by WebInstaller to provide lastPage parameters.
1232 - * @param $page stirng
 1232+ * @param $page string
12331233 * @return string
12341234 */
12351235 protected function getDocUrl( $page ) {
Index: trunk/phase3/includes/ChangesList.php
@@ -446,7 +446,7 @@
447447
448448 /** Inserts a rollback link
449449 *
450 - * @param $s
 450+ * @param $s string
451451 * @param $rc RecentChange
452452 */
453453 public function insertRollback( &$s, &$rc ) {
@@ -469,10 +469,9 @@
470470 }
471471
472472 /**
473 - * @param $s
 473+ * @param $s string
474474 * @param $rc RecentChange
475475 * @param $classes
476 - * @return
477476 */
478477 public function insertTags( &$s, &$rc, &$classes ) {
479478 if ( empty($rc->mAttribs['ts_tags']) )

Status & tagging log