This style is a lot more common in our code.
Change-Id: I7f2fb3716c24c4a95a4c6c4a732b0226c315f242
$e = new Exception;
wfDebugLog( 'recursion-guard', "Recursion detected:\n" . $e->getTraceAsString() );
- $code = $this->getConfig()->get( 'LanguageCode' ) ? : 'en';
+ $code = $this->getConfig()->get( 'LanguageCode' ) ?: 'en';
$this->lang = Language::factory( $code );
} elseif ( $this->lang === null ) {
$this->recursion = true;
$content = stream_get_contents( $handle );
flock( $handle, LOCK_UN );
fclose( $handle );
- $backoffs = json_decode( $content, true ) ? : array();
+ $backoffs = json_decode( $content, true ) ?: array();
}
return $backoffs;
$handle = fopen( $file, 'wb+' );
flock( $handle, LOCK_EX );
$content = stream_get_contents( $handle );
- $cBackoffs = json_decode( $content, true ) ? : array();
+ $cBackoffs = json_decode( $content, true ) ?: array();
foreach ( $backoffs as $type => $timestamp ) {
$cBackoffs[$type] = isset( $cBackoffs[$type] ) ? $cBackoffs[$type] : 0;
$cBackoffs[$type] = max( $cBackoffs[$type], $backoffs[$type] );
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' ) ) {
}
public function execute() {
- $wiki = $this->getOption( 'wikidb' ) ? : false;
+ $wiki = $this->getOption( 'wikidb' ) ?: false;
// Get the appropriate load balancer (for this wiki)
if ( $this->hasOption( 'cluster' ) ) {
$lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ), $wiki );