jenkins-bot has submitted this change and it was merged.

Change subject: Use [] instead of array() syntax for PHP
......................................................................


Use [] instead of array() syntax for PHP

Change-Id: I5b89aacb9c0d0640e3045a642421633ad3646961
---
M TocTree.hooks.php
M TocTree.i18n.php
M TocTree.php
3 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/TocTree.hooks.php b/TocTree.hooks.php
index 6edc22f..cd477ca 100644
--- a/TocTree.hooks.php
+++ b/TocTree.hooks.php
@@ -24,17 +24,17 @@
         * @return bool
         */
        public static function onTocPreferences( User $user, array 
&$preferences ) {
-               $preferences['toc-expand'] = array(
+               $preferences['toc-expand'] = [
                        'type' => 'toggle',
                        'label-message' => 'toctree-tog-expand',
                        'section' => 'misc/toctree',
-               );
+               ];
 
-               $preferences['toc-floated'] = array(
+               $preferences['toc-floated'] = [
                        'type' => 'toggle',
                        'label-message' => 'toctree-tog-floated',
                        'section' => 'misc/toctree',
-               );
+               ];
 
                return true;
        }
diff --git a/TocTree.i18n.php b/TocTree.i18n.php
index 6e7aa26..d5d53cd 100644
--- a/TocTree.i18n.php
+++ b/TocTree.i18n.php
@@ -10,10 +10,10 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShimbe1c9ea43bd38a62' ) ) {
        function wfJsonI18nShimbe1c9ea43bd38a62( $cache, $code, &$cachedData ) {
-               $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+               $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
                        $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
                        if ( is_readable( $fileName ) ) {
diff --git a/TocTree.php b/TocTree.php
index 7fc2605..3d9a2af 100644
--- a/TocTree.php
+++ b/TocTree.php
@@ -30,20 +30,20 @@
 $wgDefaultUserOptions['toc-expand'] = false;
 
 // resources
-$wgResourceModules['ext.toctree'] = array(
+$wgResourceModules['ext.toctree'] = [
        'localBasePath' => __DIR__ . '/modules',
        'remoteExtPath' => 'TocTree/modules',
        'styles' => 'ext.toctree.css',
        'scripts' => 'ext.toctree.js',
-);
+];
 
 // credits
-$wgExtensionCredits['parserhook'][] = array(
+$wgExtensionCredits['parserhook'][] = [
        'path' => __FILE__,
        'name' => 'TocTree',
        'url' => '//www.mediawiki.org/wiki/Extension:TocTree',
        'descriptionmsg' => 'toctree-desc',
-       'author' => array( 'Roland Unger', 'Matthias Mullie' ),
+       'author' => [ 'Roland Unger', 'Matthias Mullie' ],
        'version' => '1.12.0',
        'license-name' => 'GPL-2.0+'
-);
+];

-- 
To view, visit https://gerrit.wikimedia.org/r/312750
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b89aacb9c0d0640e3045a642421633ad3646961
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to