Merge "Allow users who are partially blocked to delete revisions."
[lhc/web/wiklou.git] / includes / widget / NamespaceInputWidget.php
index 6a0c0da..a360fb8 100644 (file)
@@ -1,18 +1,18 @@
 <?php
-/**
- * MediaWiki Widgets – NamespaceInputWidget class.
- *
- * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
- * @license The MIT License (MIT); see LICENSE.txt
- */
+
 namespace MediaWiki\Widget;
 
 /**
  * Namespace input widget. Displays a dropdown box with the choice of available namespaces.
+ *
+ * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
+ * @license MIT
  */
 class NamespaceInputWidget extends \OOUI\DropdownInputWidget {
-
-       protected $includeAllValue = null;
+       /** @var string */
+       protected $includeAllValue;
+       /** @var int[] */
+       protected $exclude;
 
        /**
         * @param array $config Configuration options
@@ -27,8 +27,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' ] );
@@ -36,8 +36,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 );