Fomafix has uploaded a new change for review.
https://gerrit.wikimedia.org/r/312505
Change subject: Use [] instead of array() in PHP
......................................................................
Use [] instead of array() in PHP
Change-Id: I4dc55b0df85fc191e2537a52b77ce636df85b706
---
M init.mw.php
M src/resources.php
M tests/resources.php
3 files changed, 62 insertions(+), 62 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseJavaScriptApi
refs/changes/05/312505/1
diff --git a/init.mw.php b/init.mw.php
index 2620e33..e7d016a 100644
--- a/init.mw.php
+++ b/init.mw.php
@@ -4,17 +4,17 @@
die( 'Not an entry point.' );
}
-$GLOBALS['wgExtensionCredits']['wikibase'][] = array(
+$GLOBALS['wgExtensionCredits']['wikibase'][] = [
'path' => __FILE__,
'name' => 'Wikibase JavaScript API',
'version' => WIKIBASE_JAVASCRIPT_API_VERSION,
- 'author' => array(
+ 'author' => [
'[http://www.snater.com H. Snater]',
- ),
+ ],
'url' =>
'https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FWikibaseJavaScriptApi',
'description' => 'Wikibase API client in JavaScript',
'license-name' => 'GPL-2.0+'
-);
+];
include __DIR__ . '/resources.php';
include __DIR__ . '/resources.test.php';
diff --git a/src/resources.php b/src/resources.php
index 9c29e77..207b0eb 100644
--- a/src/resources.php
+++ b/src/resources.php
@@ -8,65 +8,65 @@
preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) .
'(?:vendor|extensions)'
. preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__,
$remoteExtPath );
- $moduleTemplate = array(
+ $moduleTemplate = [
'localBasePath' => __DIR__,
'remoteExtPath' => '..' . $remoteExtPath[0],
- );
+ ];
- return array(
+ return [
- 'wikibase.api.__namespace' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.__namespace' => $moduleTemplate + [
+ 'scripts' => [
'namespace.js'
- ),
- ),
+ ],
+ ],
- 'wikibase.api.FormatValueCaller' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.FormatValueCaller' => $moduleTemplate + [
+ 'scripts' => [
'FormatValueCaller.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'dataValues.DataValue',
'wikibase.api.__namespace',
'wikibase.api.RepoApiError',
- )
- ),
+ ]
+ ],
- 'wikibase.api.getLocationAgnosticMwApi' => $moduleTemplate +
array(
- 'scripts' => array(
+ 'wikibase.api.getLocationAgnosticMwApi' => $moduleTemplate + [
+ 'scripts' => [
'getLocationAgnosticMwApi.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'mediawiki.api',
'mediawiki.ForeignApi',
'wikibase.api.__namespace',
- ),
- ),
+ ],
+ ],
- 'wikibase.api.ParseValueCaller' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.ParseValueCaller' => $moduleTemplate + [
+ 'scripts' => [
'ParseValueCaller.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'wikibase.api.__namespace',
'wikibase.api.RepoApiError',
- )
- ),
+ ]
+ ],
- 'wikibase.api.RepoApi' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.RepoApi' => $moduleTemplate + [
+ 'scripts' => [
'RepoApi.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'wikibase.api.__namespace',
- ),
- ),
+ ],
+ ],
- 'wikibase.api.RepoApiError' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.RepoApiError' => $moduleTemplate + [
+ 'scripts' => [
'RepoApiError.js',
- ),
- 'messages' => array(
+ ],
+ 'messages' => [
'wikibase-error-unexpected',
'wikibase-error-save-generic',
'wikibase-error-remove-generic',
@@ -74,13 +74,13 @@
'wikibase-error-remove-timeout',
'wikibase-error-ui-no-external-page',
'wikibase-error-ui-edit-conflict',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'util.inherit',
'wikibase.api.__namespace',
- ),
- ),
+ ],
+ ],
- );
+ ];
} );
diff --git a/tests/resources.php b/tests/resources.php
index 8c9b81b..1da3c97 100644
--- a/tests/resources.php
+++ b/tests/resources.php
@@ -10,34 +10,34 @@
preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) .
'(?:vendor|extensions)'
. preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__,
$remoteExtPath );
- $moduleTemplate = array(
+ $moduleTemplate = [
'localBasePath' => __DIR__,
'remoteExtPath' => '..' . $remoteExtPath[0],
- );
+ ];
- return array(
- 'wikibase.api.RepoApi.tests' => $moduleTemplate + array(
- 'scripts' => array(
+ return [
+ 'wikibase.api.RepoApi.tests' => $moduleTemplate + [
+ 'scripts' => [
'RepoApi.tests.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'wikibase.api.getLocationAgnosticMwApi',
'wikibase.api.RepoApi',
- ),
- ),
+ ],
+ ],
- 'wikibase.api.RepoApiError.tests' => $moduleTemplate + array(
- 'scripts' => array(
+ 'wikibase.api.RepoApiError.tests' => $moduleTemplate + [
+ 'scripts' => [
'RepoApiError.tests.js',
- ),
- 'dependencies' => array(
+ ],
+ 'dependencies' => [
'wikibase.api.RepoApiError',
- ),
- 'messages' => array(
+ ],
+ 'messages' => [
'wikibase-error-unexpected',
'wikibase-error-remove-timeout',
- ),
- ),
- );
+ ],
+ ],
+ ];
} );
--
To view, visit https://gerrit.wikimedia.org/r/312505
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dc55b0df85fc191e2537a52b77ce636df85b706
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits