Merge "MemoizedCallable: Add test for memoized closure"
[lhc/web/wiklou.git] / includes / htmlform / HTMLTextAreaField.php
index 5cfea63..b05fd7c 100644 (file)
@@ -22,25 +22,25 @@ class HTMLTextAreaField extends HTMLFormField {
        }
 
        function getInputHTML( $value ) {
-               $attribs = array(
+               $attribs = [
                                'id' => $this->mID,
                                'cols' => $this->getCols(),
                                'rows' => $this->getRows(),
                                'spellcheck' => $this->getSpellCheck(),
-                       ) + $this->getTooltipAndAccessKey();
+                       ] + $this->getTooltipAndAccessKey();
 
                if ( $this->mClass !== '' ) {
                        $attribs['class'] = $this->mClass;
                }
 
-               $allowedParams = array(
+               $allowedParams = [
                        'placeholder',
                        'tabindex',
                        'disabled',
                        'readonly',
                        'required',
                        'autofocus'
-               );
+               ];
 
                $attribs += $this->getAttributes( $allowedParams );
                return Html::textarea( $this->mName, $value, $attribs );
@@ -54,34 +54,29 @@ class HTMLTextAreaField extends HTMLFormField {
                $attribs = $this->getTooltipAndAccessKey();
 
                if ( $this->mClass !== '' ) {
-                       $attribs['classes'] = array( $this->mClass );
+                       $attribs['classes'] = [ $this->mClass ];
                }
 
-               $allowedParams = array(
+               $allowedParams = [
                        'placeholder',
                        'tabindex',
                        'disabled',
                        'readonly',
                        'required',
                        'autofocus',
-               );
+               ];
 
-               $attribs += $this->getAttributes( $allowedParams, array(
+               $attribs += $this->getAttributes( $allowedParams, [
                        'tabindex' => 'tabIndex',
                        'readonly' => 'readOnly',
-               ) );
+               ] );
 
-               if ( isset( $attribs['readOnly'] ) ) {
-                       // this needs to be set to a boolean value - hack??
-                       $attribs['readOnly'] = true;
-               }
-
-               return new OOUI\TextInputWidget( array(
+               return new OOUI\TextInputWidget( [
                        'id' => $this->mID,
                        'name' => $this->mName,
                        'multiline' => true,
                        'value' => $value,
                        'rows' => $this->getRows(),
-               ) + $attribs );
+               ] + $attribs );
        }
 }