Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / htmlform / HTMLFormField.php
index 5066f28..cd4d4b7 100644 (file)
@@ -546,8 +546,7 @@ abstract class HTMLFormField {
                        'mw-htmlform-nolabel' => ( $label === '' )
                ];
 
-               $horizontalLabel = isset( $this->mParams['horizontal-label'] )
-                       ? $this->mParams['horizontal-label'] : false;
+               $horizontalLabel = $this->mParams['horizontal-label'] ?? false;
 
                if ( $horizontalLabel ) {
                        $field = ' ' . $inputHtml . "\n$errors";
@@ -950,8 +949,7 @@ abstract class HTMLFormField {
 
                $displayFormat = $this->mParent->getDisplayFormat();
                $html = '';
-               $horizontalLabel = isset( $this->mParams['horizontal-label'] )
-                       ? $this->mParams['horizontal-label'] : false;
+               $horizontalLabel = $this->mParams['horizontal-label'] ?? false;
 
                if ( $displayFormat === 'table' ) {
                        $html =