From 5ef5287267ac8d7b553f0f7edd8ce171eb28165f Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Mon, 11 Mar 2019 22:03:39 +0100 Subject: [PATCH] Use php null coalesce operator ?? Change-Id: I50244cd16f2c30bacc90421fa9218a8bf454ca6a --- includes/TemplateDataBlob.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/TemplateDataBlob.php b/includes/TemplateDataBlob.php index b2675ed3..a00dbbbb 100644 --- a/includes/TemplateDataBlob.php +++ b/includes/TemplateDataBlob.php @@ -170,8 +170,7 @@ class TemplateDataBlob { // Root.format if ( isset( $data->format ) && $data->format !== null ) { - $f = isset( self::$formats[$data->format] ) ? self::$formats[$data->format] : - $data->format; + $f = self::$formats[$data->format] ?? $data->format; if ( !is_string( $f ) || !preg_match( '/^\n?\{\{ *_+\n? *\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f )