Initialise array with contents in one go
authorReedy <reedy@wikimedia.org>
Tue, 23 Feb 2016 23:39:40 +0000 (23:39 +0000)
committerReedy <reedy@wikimedia.org>
Tue, 23 Feb 2016 23:39:40 +0000 (23:39 +0000)
Change-Id: Id9ea7a8f17905a0e1e3c0ff12a9ba6c54de54dbe

includes/ListToggle.php

index dfa1763..4733dfb 100644 (file)
@@ -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',
                        [