From: Bartosz DziewoƄski Date: Mon, 25 Aug 2014 15:40:51 +0000 (+0200) Subject: No space within the ?: operator X-Git-Tag: 1.31.0-rc.0~14286 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=9e5443abc3203319ea93f3e31332d4b1abc8e068;p=lhc%2Fweb%2Fwiklou.git No space within the ?: operator This style is a lot more common in our code. Change-Id: I7f2fb3716c24c4a95a4c6c4a732b0226c315f242 --- diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 51781890ea..091e8da911 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -297,7 +297,7 @@ class RequestContext implements IContextSource { $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; diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index c5e7f2ea17..617a3a31df 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -235,7 +235,7 @@ class JobRunner { $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; @@ -253,7 +253,7 @@ class JobRunner { $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] ); diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 1db53f30c9..d5f6834669 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' ) ) { diff --git a/maintenance/sql.php b/maintenance/sql.php index 389b2701e5..afa3ef725c 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -39,7 +39,7 @@ class MwSql extends Maintenance { } 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 );