diff options
author | thiemowmde <thiemo.kreuz@wikimedia.de> | 2023-07-07 13:11:05 +0200 |
---|---|---|
committer | thiemowmde <thiemo.kreuz@wikimedia.de> | 2023-07-07 13:11:05 +0200 |
commit | 918aed5f77e26d4088d65b0e36ad187a74e7c937 (patch) | |
tree | a214b1db1d1510e06c37e2bf30fcac546abfbf62 /includes/htmlform/CollapsibleFieldsetLayout.php | |
parent | 709a5cce79db33c4babed01afbea3cfbc2bb95cb (diff) | |
download | mediawikicore-918aed5f77e26d4088d65b0e36ad187a74e7c937.tar.gz mediawikicore-918aed5f77e26d4088d65b0e36ad187a74e7c937.zip |
htmlform: Use more compact PHP features in places
Some of these classes are really huge, up to 2000 lines and more. I
hope this makes the source code a little more readable.
Change-Id: I3d4b2a042a34c14e6ea0ea30ea31ca53448d8d59
Diffstat (limited to 'includes/htmlform/CollapsibleFieldsetLayout.php')
-rw-r--r-- | includes/htmlform/CollapsibleFieldsetLayout.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/htmlform/CollapsibleFieldsetLayout.php b/includes/htmlform/CollapsibleFieldsetLayout.php index f55711f18829..99c04a2a9f89 100644 --- a/includes/htmlform/CollapsibleFieldsetLayout.php +++ b/includes/htmlform/CollapsibleFieldsetLayout.php @@ -12,7 +12,7 @@ class CollapsibleFieldsetLayout extends OOUI\FieldsetLayout { parent::__construct( $config ); $this->addClasses( [ 'mw-collapsibleFieldsetLayout', 'mw-collapsible' ] ); - if ( isset( $config[ 'collapsed' ] ) && $config[ 'collapsed' ] ) { + if ( $config['collapsed'] ?? false ) { $this->addClasses( [ 'mw-collapsed' ] ); } $this->header->addClasses( [ 'mw-collapsible-toggle' ] ); |