Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / widget / NamespaceInputWidget.php
index 0840886..7802a2a 100644 (file)
@@ -25,8 +25,8 @@ class NamespaceInputWidget extends \OOUI\DropdownInputWidget {
                parent::__construct( $config );
 
                // Properties
-               $this->includeAllValue = isset( $config['includeAllValue'] ) ? $config['includeAllValue'] : null;
-               $this->exclude = isset( $config['exclude'] ) ? $config['exclude'] : [];
+               $this->includeAllValue = $config['includeAllValue'] ?? null;
+               $this->exclude = $config['exclude'] ?? [];
 
                // Initialization
                $this->addClasses( [ 'mw-widget-namespaceInputWidget' ] );
@@ -34,8 +34,8 @@ class NamespaceInputWidget extends \OOUI\DropdownInputWidget {
 
        protected function getNamespaceDropdownOptions( array $config ) {
                $namespaceOptionsParams = [
-                       'all' => isset( $config['includeAllValue'] ) ? $config['includeAllValue'] : null,
-                       'exclude' => isset( $config['exclude'] ) ? $config['exclude'] : null
+                       'all' => $config['includeAllValue'] ?? null,
+                       'exclude' => $config['exclude'] ?? null
                ];
                $namespaceOptions = \Html::namespaceSelectorOptions( $namespaceOptionsParams );