Update ternary notation
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 4 Dec 2013 08:52:51 +0000 (09:52 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 4 Dec 2013 08:52:51 +0000 (09:52 +0100)
Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5

includes/filebackend/FileBackendStore.php
includes/filebackend/FileOp.php
includes/job/JobQueueRedis.php
includes/logging/LogEntry.php
maintenance/getConfiguration.php

index 2fe51c0..2f3e0e2 100644 (file)
@@ -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 );
index 538d9b4..82959d8 100644 (file)
@@ -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
                        ) ) );
index 9d2a673..9b9fe2d 100644 (file)
@@ -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()
index e15943f..40846a2 100644 (file)
@@ -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 ) {
index 5a5eb58..52cb209 100644 (file)
@@ -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' ) ) {