Update ternary notation

Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5
This commit is contained in:
Siebrand Mazeland 2013-12-04 09:52:51 +01:00
parent 213c64e360
commit 8c0cbe6f83
5 changed files with 5 additions and 5 deletions

View 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 );

View 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
) ) );

View 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()

View 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 ) {

View 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' ) ) {