jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331493 )

Change subject: Change PHP array syntax from array(...) to [...]
......................................................................


Change PHP array syntax from array(...) to [...]

Also
* Use tabs for indenting.
* Always use single space.
* Add newline at end of file.
* Use spaces inside of parentheses.

Change-Id: I3bcae9c766868d6c55d36820ede0a09abf580d00
---
M COPYING
M LICENSE
M PageLanguageApi.php
M README
M extension.json
M i18n/en.json
M i18n/nl.json
M i18n/qqq.json
M includes/api/PageLanguageApi.php
9 files changed, 34 insertions(+), 34 deletions(-)

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



diff --git a/COPYING b/COPYING
index 8ab948f..a0a4884 100644
--- a/COPYING
+++ b/COPYING
@@ -18,4 +18,4 @@
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/LICENSE b/LICENSE
index 8ab948f..a0a4884 100644
--- a/LICENSE
+++ b/LICENSE
@@ -18,4 +18,4 @@
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/PageLanguageApi.php b/PageLanguageApi.php
index c539814..e39c4eb 100644
--- a/PageLanguageApi.php
+++ b/PageLanguageApi.php
@@ -16,18 +16,18 @@
  * Editors are encouraged to edit that file instead and ensure that this file 
is updated accordingly
  */
 
-$wgExtensionCredits['api'][] = array(
+$wgExtensionCredits['api'][] = [
        'path' => __FILE__,
        'name' => 'PageLanguageApi',
        'author' => 'Klaas Skelte van der Werf',
        'url' => 'https://www.mediawiki.org/wiki/Extension:PageLanguageApi',
        'descriptionmsg' => 'pagelanguageapi-desc',
-       'version'  => '1.0.0.0',
+       'version' => '1.0.0.0',
        'license-name' => "MIT",
-    'type' => 'api'
-);
+       'type' => 'api'
+];
 /* Setup */
 $wgMessagesDirs['PageLanguageApi'] = __DIR__ . '/i18n';
 
 $wgAutoloadClasses['PageLanguageApi'] = __DIR__ . 
'/includes/api/PageLanguageApi.php';
-$wgAPIModules['pagelang'] = 'PageLanguageApi';
\ No newline at end of file
+$wgAPIModules['pagelang'] = 'PageLanguageApi';
diff --git a/README b/README
index 30d66cc..4a9c533 100644
--- a/README
+++ b/README
@@ -20,4 +20,4 @@
 # pageids - A list of pageids, separated by a pipe (|) or U+001F for 1.28
 # lang - The language code to change the new pages to. This parameter can be 
omitted to indicate that
 the wikis default language should be used
-# token - A csrf token
\ No newline at end of file
+# token - A csrf token
diff --git a/extension.json b/extension.json
index 1c8bbc0..571633b 100644
--- a/extension.json
+++ b/extension.json
@@ -22,4 +22,4 @@
        "requires": {
                "MediaWiki": ">= 1.24.0"
        }
-}
\ No newline at end of file
+}
diff --git a/i18n/en.json b/i18n/en.json
index 5088b21..d746e7e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,4 +9,4 @@
        "pagelanguageapi-disabled": "The pagelang module has been disabled.",
        "pagelanguageapi-permissiondenied": "Permission denied.",
        "badlanguage-code": "Invalid language code."
-}
\ No newline at end of file
+}
diff --git a/i18n/nl.json b/i18n/nl.json
index dae14bd..84709a5 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -9,4 +9,4 @@
        "pagelanguageapi-disabled": "De pagelang module is uitgeschakeld.",
        "pagelanguageapi-permissiondenied": "Toegang geweigerd.",
        "badlanguage-code": "Ongeldige taalcode."
-}
\ No newline at end of file
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 013d6b0..e041cb7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,4 +9,4 @@
        "pagelanguageapi-disabled": "API error code displayed when the page 
language module is disabled",
        "pagelanguageapi-permissiondenied": "API error code displayed when the 
user does not have the pagelang right",
        "badlanguage-code": "API error code displayed when the language code is 
invalid"
-}
\ No newline at end of file
+}
diff --git a/includes/api/PageLanguageApi.php b/includes/api/PageLanguageApi.php
index 3893af5..5c6be72 100644
--- a/includes/api/PageLanguageApi.php
+++ b/includes/api/PageLanguageApi.php
@@ -20,7 +20,7 @@
         * This method performs all the magic whenever the api is called with 
action=pagelang
         */
        public function execute() {
-               //Exit with error moduledisabled if the change page language 
feature is disabled
+               // Exit with error moduledisabled if the change page language 
feature is disabled
                if ( !$GLOBALS['wgPageLanguageUseDB'] ) {
                        // Deprecated since 1.29, use ApiBase::dieWithError() 
instead, retained for backwards compatibility for now
                        // Using wfMessage to allow usage of i18n files, as to 
prevent duplication errors
@@ -51,10 +51,10 @@
                // Populate the object with titles
                $titles->execute();
                // Gets the invalid titles
-               $invalidtitles = $titles->getInvalidTitlesAndRevisions( array( 
'invalidTitles', 'special', 'missingIds', 'interwikiTitles' ) );
+               $invalidtitles = $titles->getInvalidTitlesAndRevisions( [ 
'invalidTitles', 'special', 'missingIds', 'interwikiTitles' ] );
 
                // Get the special page object, used for the actual changing
-               $specialpage = SpecialPageFactory::getPage('PageLanguage');
+               $specialpage = SpecialPageFactory::getPage( 'PageLanguage' );
 
                // Create an array with the information needed by the special 
page
                $dataarray['language'] = $languagecode;
@@ -140,19 +140,19 @@
         * @return array
         */
        public function getAllowedParams() {
-               return array_merge( parent::getAllowedParams(), array(
-                       'titles' => array (
+               return array_merge( parent::getAllowedParams(), [
+                       'titles' => [
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => 'string'
-                       ),
-                       'pageids' => array (
+                       ],
+                       'pageids' => [
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => 'integer'
-                       ),
-                       'lang' => array (
+                       ],
+                       'lang' => [
                                ApiBase::PARAM_TYPE => 'string'
-                       )
-               ) );
+                       ]
+               ] );
        }
 
        /**
@@ -160,10 +160,10 @@
         * @return array
         */
        public function getExamplesMessages() {
-               return array(
+               return [
                        // apisampleoutput-pagelang is the key to the i18n 
message explaining the example
                        
'action=pagelang&titles=Main%20Page&lang=fy&token=123ABC+\\' => 
'apisampleoutput-pagelang'
-               );
+               ];
        }
 
        /**
@@ -185,10 +185,10 @@
         * @return array|bool|string
         */
        public function getExamples() {
-               return array(
+               return [
                        // apisampleoutput-pagelang is the key to the i18n 
message explaining the example
-                       
'api.php?action=pagelang&titles=Main%20Page&lang=fy&token=123ABC+\\' => 
wfMessage('apisampleoutput-pagelang')->plain()
-               );
+                       
'api.php?action=pagelang&titles=Main%20Page&lang=fy&token=123ABC+\\' => 
wfMessage( 'apisampleoutput-pagelang' )->plain()
+               ];
        }
 
        /**
@@ -198,7 +198,7 @@
         */
        public function getDescription() {
                //return 'Change the page language for a given set of pages.';
-               return wfMessage('apihelp-pagelang-description')->plain();
+               return wfMessage( 'apihelp-pagelang-description' )->plain();
        }
 
        /**
@@ -208,10 +208,10 @@
         * @return array
         */
        public function getParamDescription() {
-               return array_merge( parent::getParamDescription(), array(
-                       'titles' => 
wfMessage('apihelp-pagelang-param-titles')->plain(),
-                       'pageids' => 
wfMessage('apihelp-pagelang-param-pageids')->plain(),
-                       'lang' => 
wfMessage('apihelp-pagelang-param-lang')->plain()
-               ) );
+               return array_merge( parent::getParamDescription(), [
+                       'titles' => wfMessage( 'apihelp-pagelang-param-titles' 
)->plain(),
+                       'pageids' => wfMessage( 
'apihelp-pagelang-param-pageids' )->plain(),
+                       'lang' => wfMessage( 'apihelp-pagelang-param-lang' 
)->plain()
+               ] );
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bcae9c766868d6c55d36820ede0a09abf580d00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageLanguageApi
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to