From 8c0cbe6f830c4c7f181b2e070f07854ab0dc8d07 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 4 Dec 2013 09:52:51 +0100 Subject: [PATCH] Update ternary notation Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5 --- includes/filebackend/FileBackendStore.php | 2 +- includes/filebackend/FileOp.php | 2 +- includes/job/JobQueueRedis.php | 2 +- includes/logging/LogEntry.php | 2 +- maintenance/getConfiguration.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 2fe51c0a2c..2f3e0e2272 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -70,7 +70,7 @@ abstract class FileBackendStore extends FileBackend { ? $config['mimeCallback'] : function ( $storagePath, $content, $fsPath ) { // @TODO: handle the case of extension-less files using the contents - return StreamFile::contentTypeFromPath( $storagePath ) ? : 'unknown/unknown'; + return StreamFile::contentTypeFromPath( $storagePath ) ?: 'unknown/unknown'; }; $this->memCache = new EmptyBagOStuff(); // disabled by default $this->cheapCache = new ProcessCacheLRU( self::CACHE_CHEAP_SIZE ); diff --git a/includes/filebackend/FileOp.php b/includes/filebackend/FileOp.php index 538d9b471b..82959d8564 100644 --- a/includes/filebackend/FileOp.php +++ b/includes/filebackend/FileOp.php @@ -645,7 +645,7 @@ class CopyFileOp extends FileOp { $status = Status::newGood(); // nothing to do } elseif ( $this->params['src'] === $this->params['dst'] ) { // Just update the destination file headers - $headers = $this->getParam( 'headers' ) ? : array(); + $headers = $this->getParam( 'headers' ) ?: array(); $status = $this->backend->describeInternal( $this->setFlags( array( 'src' => $this->params['dst'], 'headers' => $headers ) ) ); diff --git a/includes/job/JobQueueRedis.php b/includes/job/JobQueueRedis.php index 9d2a67355c..9b9fe2d4e2 100644 --- a/includes/job/JobQueueRedis.php +++ b/includes/job/JobQueueRedis.php @@ -776,7 +776,7 @@ LUA; 'title' => $job->getTitle()->getDBkey(), 'params' => $job->getParams(), // Some jobs cannot run until a "release timestamp" - 'rtimestamp' => $job->getReleaseTimestamp() ? : 0, + 'rtimestamp' => $job->getReleaseTimestamp() ?: 0, // Additional job metadata 'uuid' => UIDGenerator::newRawUUIDv4( UIDGenerator::QUICK_RAND ), 'sha1' => $job->ignoreDuplicates() diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index e15943fd10..40846a2bbf 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -450,7 +450,7 @@ class ManualLogEntry extends LogEntryBase { public function insert( IDatabase $dbw = null ) { global $wgContLang; - $dbw = $dbw ? : wfGetDB( DB_MASTER ); + $dbw = $dbw ?: wfGetDB( DB_MASTER ); $id = $dbw->nextSequenceValue( 'logging_log_id_seq' ); if ( $this->timestamp === null ) { diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 5a5eb58749..52cb209ce8 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -87,7 +87,7 @@ class GetConfiguration extends Maintenance { public function finalSetup() { parent::finalSetup(); - $this->regex = $this->getOption( 'regex' ) ? : $this->getOption( 'iregex' ); + $this->regex = $this->getOption( 'regex' ) ?: $this->getOption( 'iregex' ); if ( $this->regex ) { $this->regex = '/' . $this->regex . '/'; if ( $this->hasOption( 'iregex' ) ) { -- 2.20.1