X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwidget%2FNamespaceInputWidget.php;h=a360fb8e917e0786167f2f424922c86c5eab7a53;hb=1e2cce13eae6d97b312be2e96a70a443a79c4465;hp=0840886a799e68d4a861a7e4dedc7ac0fc1c68e3;hpb=6f7e982df6479e27c3b17f2deda8404ef55f50e6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/widget/NamespaceInputWidget.php b/includes/widget/NamespaceInputWidget.php index 0840886a79..a360fb8e91 100644 --- a/includes/widget/NamespaceInputWidget.php +++ b/includes/widget/NamespaceInputWidget.php @@ -9,8 +9,10 @@ namespace MediaWiki\Widget; * @license MIT */ class NamespaceInputWidget extends \OOUI\DropdownInputWidget { - - protected $includeAllValue = null; + /** @var string */ + protected $includeAllValue; + /** @var int[] */ + protected $exclude; /** * @param array $config Configuration options @@ -25,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' ] ); @@ -34,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 );