From 3714131b5dc26794512b0e9f59999a9eeb9bf7e2 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 11 Jun 2018 19:23:15 +0200 Subject: [PATCH] Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient This is a followup to 485f66f1. Change-Id: I7a2a44b7e933103178929b3cdc015859612c8b35 --- includes/GlobalFunctions.php | 2 +- includes/changetags/ChangeTags.php | 2 +- includes/db/DatabaseOracle.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 335451e7b7..d9996f426f 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2299,7 +2299,7 @@ function wfShellWikiCmd( $script, array $parameters = [], array $options = [] ) // Give site config file a chance to run the script in a wrapper. // The caller may likely want to call wfBasename() on $script. Hooks::run( 'wfShellWikiCmd', [ &$script, &$parameters, &$options ] ); - $cmd = isset( $options['php'] ) ? [ $options['php'] ] : [ $wgPhpCli ]; + $cmd = [ $options['php'] ?? $wgPhpCli ]; if ( isset( $options['wrapper'] ) ) { $cmd[] = $options['wrapper']; } diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 0c81144531..09d1b81491 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -386,7 +386,7 @@ class ChangeTags { 'ct_log_id' => $log_id, 'ct_rev_id' => $rev_id, 'ct_params' => $params, - 'ct_tag_id' => isset( $changeTagMapping[$tag] ) ? $changeTagMapping[$tag] : null, + 'ct_tag_id' => $changeTagMapping[$tag] ?? null, ] ); diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 3362f0f907..f4f04f1ff9 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -675,7 +675,7 @@ class DatabaseOracle extends Database { } $table = strtolower( $this->removeIdentifierQuotes( $this->tableName( $table ) ) ); - return ( isset( $this->sequenceData[$table] ) ) ? $this->sequenceData[$table] : false; + return $this->sequenceData[$table] ?? false; } /** -- 2.20.1