Use php null coalesce operator ??

Change-Id: I50244cd16f2c30bacc90421fa9218a8bf454ca6a
This commit is contained in:
Umherirrender 2019-03-11 22:03:39 +01:00
parent 5b70405237
commit 5ef5287267

View file

@ -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 )