aboutsummaryrefslogtreecommitdiffstats
path: root/includes/ListToggle.php
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2016-02-23 23:39:40 +0000
committerReedy <reedy@wikimedia.org>2016-02-23 23:39:40 +0000
commit1dcfa9acb3ea8f402e778ec3d263f72e4ce40012 (patch)
treef256b319ca23550c6d7302fa390431d50ca5b76a /includes/ListToggle.php
parent7a31c491d4fd0d17a4523a9e0e05fd951bc416aa (diff)
downloadmediawikicore-1dcfa9acb3ea8f402e778ec3d263f72e4ce40012.tar.gz
mediawikicore-1dcfa9acb3ea8f402e778ec3d263f72e4ce40012.zip
Initialise array with contents in one go
Change-Id: Id9ea7a8f17905a0e1e3c0ff12a9ba6c54de54dbe
Diffstat (limited to 'includes/ListToggle.php')
-rw-r--r--includes/ListToggle.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/ListToggle.php b/includes/ListToggle.php
index dfa1763a1976..4733dfb7144e 100644
--- a/includes/ListToggle.php
+++ b/includes/ListToggle.php
@@ -51,10 +51,11 @@ class ListToggle {
*/
public function getHTML() {
// Select: All, None, Invert
- $links = [];
- $links[] = $this->checkboxLink( 'all' );
- $links[] = $this->checkboxLink( 'none' );
- $links[] = $this->checkboxLink( 'invert' );
+ $links = [
+ $this->checkboxLink( 'all' ),
+ $this->checkboxLink( 'none' ),
+ $this->checkboxLink( 'invert' ),
+ ];
return Html::rawElement( 'div',
[