[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/pages

2017-06-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358073 )

Change subject: Use short array syntax - includes/pages
..


Use short array syntax - includes/pages

Done by phpcbf over composer fix

Change-Id: I17aa9005f8b2cf4fcd8c2455dcb9b3c017c1
---
M includes/pages/ActionPage.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
11 files changed, 444 insertions(+), 444 deletions(-)

Approvals:
  Huji: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/pages/ActionPage.php b/includes/pages/ActionPage.php
index 5cf05b0..a7227dd 100644
--- a/includes/pages/ActionPage.php
+++ b/includes/pages/ActionPage.php
@@ -45,7 +45,7 @@
}
 
$languages = array_merge(
-   array( $userLang ),
+   [ $userLang ],
Language::getFallbacksFor( $userLang ) );
 
if ( !in_array( $election->getLanguage(), $languages ) ) {
@@ -61,6 +61,6 @@
 * Relay for SpecialPage::msg
 */
protected function msg( /* args */ ) {
-   return call_user_func_array( array( $this->specialPage, 'msg' 
), func_get_args() );
+   return call_user_func_array( [ $this->specialPage, 'msg' ], 
func_get_args() );
}
 }
diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php
index d7b638c..2e44e02 100644
--- a/includes/pages/CreatePage.php
+++ b/includes/pages/CreatePage.php
@@ -66,38 +66,38 @@
 
# These are for injecting raw HTML into the HTMLForm for the
# multi-column aspects of the designed layout.
-   $layoutTableStart = array(
+   $layoutTableStart = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableMid = array(
+   ];
+   $layoutTableMid = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableEnd = array(
+   ];
+   $layoutTableEnd = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
+   ];
 
-   $formItems = array();
+   $formItems = [];
 
-   $formItems['election_id'] = array(
+   $formItems['election_id'] = [
'type' => 'hidden',
'default' => -1,
'output-as-default' => false,
-   );
+   ];
 
-   $formItems['election_title'] = array(
+   $formItems['election_title'] = [
'label-message' => 
'securepoll-create-label-election_title',
'type' => 'text',
'required' => true,
-   );
+   ];
 
$wikiNames = SecurePoll_FormStore::getWikiList();
-   $options = array();
+   $options = [];
$options['securepoll-create-option-wiki-this_wiki'] = 
wfWikiID();
if ( count( $wikiNames ) > 1 ) {
$options['securepoll-create-option-wiki-all_wikis'] = 
'*';
@@ -112,7 +112,7 @@
// Only option is wfWikiID(), so don't bother making 
the user select it.
} elseif ( count( $wikiNames ) < 10 ) {
// So few, we may as well just list them explicitly
-   $opts = array();
+   $opts = [];
foreach ( $options as $msg => $value ) {
$opts[$this->msg( $msg )->plain()] = $value;
}
@@ -124,165 +124,165 @@
$opts[$this->msg( 
'securepoll-create-option-wiki-other_wiki' )->plain()] =
$wikiNames;
}
-   $formItems['property_wiki'] = array(
+   $formItems['property_wiki'] = [
'type' => 'select',
'options' => $opts,
'label-message' => 
'securepoll-create-label-wiki',
-   );
+   ];
} else {
$options['securepoll-create-option-wiki-other_wiki'] = 
'other';
-   $formItems['property_wiki'] = array(
+  

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/pages

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358073 )

Change subject: Use short array syntax - includes/pages
..

Use short array syntax - includes/pages

Done by phpcbf over composer fix

Change-Id: I17aa9005f8b2cf4fcd8c2455dcb9b3c017c1
---
M includes/pages/ActionPage.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
11 files changed, 444 insertions(+), 444 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll 
refs/changes/73/358073/1

diff --git a/includes/pages/ActionPage.php b/includes/pages/ActionPage.php
index 5cf05b0..a7227dd 100644
--- a/includes/pages/ActionPage.php
+++ b/includes/pages/ActionPage.php
@@ -45,7 +45,7 @@
}
 
$languages = array_merge(
-   array( $userLang ),
+   [ $userLang ],
Language::getFallbacksFor( $userLang ) );
 
if ( !in_array( $election->getLanguage(), $languages ) ) {
@@ -61,6 +61,6 @@
 * Relay for SpecialPage::msg
 */
protected function msg( /* args */ ) {
-   return call_user_func_array( array( $this->specialPage, 'msg' 
), func_get_args() );
+   return call_user_func_array( [ $this->specialPage, 'msg' ], 
func_get_args() );
}
 }
diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php
index d7b638c..2e44e02 100644
--- a/includes/pages/CreatePage.php
+++ b/includes/pages/CreatePage.php
@@ -66,38 +66,38 @@
 
# These are for injecting raw HTML into the HTMLForm for the
# multi-column aspects of the designed layout.
-   $layoutTableStart = array(
+   $layoutTableStart = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableMid = array(
+   ];
+   $layoutTableMid = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableEnd = array(
+   ];
+   $layoutTableEnd = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
+   ];
 
-   $formItems = array();
+   $formItems = [];
 
-   $formItems['election_id'] = array(
+   $formItems['election_id'] = [
'type' => 'hidden',
'default' => -1,
'output-as-default' => false,
-   );
+   ];
 
-   $formItems['election_title'] = array(
+   $formItems['election_title'] = [
'label-message' => 
'securepoll-create-label-election_title',
'type' => 'text',
'required' => true,
-   );
+   ];
 
$wikiNames = SecurePoll_FormStore::getWikiList();
-   $options = array();
+   $options = [];
$options['securepoll-create-option-wiki-this_wiki'] = 
wfWikiID();
if ( count( $wikiNames ) > 1 ) {
$options['securepoll-create-option-wiki-all_wikis'] = 
'*';
@@ -112,7 +112,7 @@
// Only option is wfWikiID(), so don't bother making 
the user select it.
} elseif ( count( $wikiNames ) < 10 ) {
// So few, we may as well just list them explicitly
-   $opts = array();
+   $opts = [];
foreach ( $options as $msg => $value ) {
$opts[$this->msg( $msg )->plain()] = $value;
}
@@ -124,165 +124,165 @@
$opts[$this->msg( 
'securepoll-create-option-wiki-other_wiki' )->plain()] =
$wikiNames;
}
-   $formItems['property_wiki'] = array(
+   $formItems['property_wiki'] = [
'type' => 'select',
'options' => $opts,
'label-message' => 
'securepoll-create-label-wiki',
-   );
+   ];
} else {
$options['securepoll-create-option-wiki-other_wiki'] = 
'other';
-   $formItems['property_wiki'] =