[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Convert arrays to new syntax

2016-10-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert arrays to new syntax
..


Convert arrays to new syntax

Change-Id: Id24e9e4c2a8720af76adcfb9fdf07b74e80f68a3
---
M includes/ApiGraph.php
M includes/DataModule.php
M includes/Graph.hooks.php
M includes/ParserTag.php
M includes/Sandbox.php
5 files changed, 34 insertions(+), 34 deletions(-)

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



diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index 1c08046..6ae4f5f 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -47,24 +47,24 @@
}
 
public function getAllowedParams() {
-   return array(
-   'hash' => array(
+   return [
+   'hash' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'title' => array(
+   ],
+   'title' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'text' => array(
+   ],
+   'text' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   );
+   ],
+   ];
}
 
protected function getExamplesMessages() {
-   return array(
+   return [

'formatversion=2&action=graph&title=Extension%3AGraph%2FDemo&hash=1533aaad45c733dcc7e07614b54cbae4119a6747'
=> 'apihelp-graph-example',
-   );
+   ];
}
 
/**
@@ -108,10 +108,10 @@
$this->dieUsage( 'Invalid title given.', 
'invalidtitle' );
}
 
-   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', array(
+   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', [
'pp_page' => $title->getArticleID(),
'pp_propname' => 'graph_specs',
-   ), __METHOD__ );
+   ], __METHOD__ );
 
if ( $ppValue ) {
// Copied from 
TemplateDataBlob.php:newFromDatabase()
diff --git a/includes/DataModule.php b/includes/DataModule.php
index 7b598f6..469b39b 100644
--- a/includes/DataModule.php
+++ b/includes/DataModule.php
@@ -14,14 +14,14 @@
 
 class DataModule extends ResourceLoaderModule {
 
-   protected $targets = array( 'desktop', 'mobile' );
+   protected $targets = [ 'desktop', 'mobile' ];
 
public function getScript( ResourceLoaderContext $context ) {
$config = $context->getResourceLoader()->getConfig();
-   return ResourceLoader::makeConfigSetScript( array(
+   return ResourceLoader::makeConfigSetScript( [
'wgGraphAllowedDomains' => $config->get( 
'GraphAllowedDomains' ),
'wgGraphIsTrusted' => $config->get( 'GraphIsTrusted' ),
-   ) );
+   ] );
}
 
public function enableModuleContentVersion() {
diff --git a/includes/Graph.hooks.php b/includes/Graph.hooks.php
index 18c2b49..b77cdc1 100644
--- a/includes/Graph.hooks.php
+++ b/includes/Graph.hooks.php
@@ -28,18 +28,18 @@
isset( $resourceModules[ 'ext.visualEditor.mediawiki' ] 
) ||
$resourceLoader->isModuleRegistered( 
'ext.visualEditor.mediawiki' )
) {
-   $testModules['qunit']['ext.graph.visualEditor.test'] = 
array(
-   'scripts' => array(
+   $testModules['qunit']['ext.graph.visualEditor.test'] = [
+   'scripts' => [

'modules/ve-graph/tests/ext.graph.visualEditor.test.js'
-   ),
-   'dependencies' => array(
+   ],
+   'dependencies' => [
'ext.graph.visualEditor',
'ext.graph.vega1',
'ext.visualEditor.test'
-   ),
+   ],
'localBasePath' => dirname( __DIR__ ),
'remoteExtPath' => 'Graph'
-   );
+   ];
}
 
return true;
diff --git a/includes/ParserTag.php b/includes/ParserTag.php
index 8e8a608..a4fe751 100644
--- a/includes/ParserTag.php
+++ b/includes/ParserTag.php
@@ -102,7 +102,7 @@
 * @return array
 */
private funct

[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Convert arrays to new syntax

2016-10-14 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316023

Change subject: Convert arrays to new syntax
..

Convert arrays to new syntax

Change-Id: Id24e9e4c2a8720af76adcfb9fdf07b74e80f68a3
---
M includes/ApiGraph.php
M includes/DataModule.php
M includes/Graph.hooks.php
M includes/ParserTag.php
M includes/Sandbox.php
5 files changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/23/316023/1

diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index 1c08046..6ae4f5f 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -47,24 +47,24 @@
}
 
public function getAllowedParams() {
-   return array(
-   'hash' => array(
+   return [
+   'hash' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'title' => array(
+   ],
+   'title' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'text' => array(
+   ],
+   'text' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   );
+   ],
+   ];
}
 
protected function getExamplesMessages() {
-   return array(
+   return [

'formatversion=2&action=graph&title=Extension%3AGraph%2FDemo&hash=1533aaad45c733dcc7e07614b54cbae4119a6747'
=> 'apihelp-graph-example',
-   );
+   ];
}
 
/**
@@ -108,10 +108,10 @@
$this->dieUsage( 'Invalid title given.', 
'invalidtitle' );
}
 
-   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', array(
+   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', [
'pp_page' => $title->getArticleID(),
'pp_propname' => 'graph_specs',
-   ), __METHOD__ );
+   ], __METHOD__ );
 
if ( $ppValue ) {
// Copied from 
TemplateDataBlob.php:newFromDatabase()
diff --git a/includes/DataModule.php b/includes/DataModule.php
index 7b598f6..469b39b 100644
--- a/includes/DataModule.php
+++ b/includes/DataModule.php
@@ -14,14 +14,14 @@
 
 class DataModule extends ResourceLoaderModule {
 
-   protected $targets = array( 'desktop', 'mobile' );
+   protected $targets = [ 'desktop', 'mobile' ];
 
public function getScript( ResourceLoaderContext $context ) {
$config = $context->getResourceLoader()->getConfig();
-   return ResourceLoader::makeConfigSetScript( array(
+   return ResourceLoader::makeConfigSetScript( [
'wgGraphAllowedDomains' => $config->get( 
'GraphAllowedDomains' ),
'wgGraphIsTrusted' => $config->get( 'GraphIsTrusted' ),
-   ) );
+   ] );
}
 
public function enableModuleContentVersion() {
diff --git a/includes/Graph.hooks.php b/includes/Graph.hooks.php
index 18c2b49..b77cdc1 100644
--- a/includes/Graph.hooks.php
+++ b/includes/Graph.hooks.php
@@ -28,18 +28,18 @@
isset( $resourceModules[ 'ext.visualEditor.mediawiki' ] 
) ||
$resourceLoader->isModuleRegistered( 
'ext.visualEditor.mediawiki' )
) {
-   $testModules['qunit']['ext.graph.visualEditor.test'] = 
array(
-   'scripts' => array(
+   $testModules['qunit']['ext.graph.visualEditor.test'] = [
+   'scripts' => [

'modules/ve-graph/tests/ext.graph.visualEditor.test.js'
-   ),
-   'dependencies' => array(
+   ],
+   'dependencies' => [
'ext.graph.visualEditor',
'ext.graph.vega1',
'ext.visualEditor.test'
-   ),
+   ],
'localBasePath' => dirname( __DIR__ ),
'remoteExtPath' => 'Graph'
-   );
+   ];
}
 
return true;
diff --git a/includes/ParserTag.php b/includes/ParserTag.php
index 8e8a608..a4fe751 100644
--- a/includes/ParserTag.php
+++ b/includes/ParserTag.php
@@ -102,7 +102,7 @@