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

Change subject: Fix phpcs errors & warnings
......................................................................


Fix phpcs errors & warnings

Change-Id: Ib978bc6c269239e05986a656f798bb145fc950ca
---
M UploadWizard.php
M UploadWizardHooks.php
2 files changed, 40 insertions(+), 19 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/UploadWizard.php b/UploadWizard.php
index 3699ad9..e2d182a 100644
--- a/UploadWizard.php
+++ b/UploadWizard.php
@@ -28,7 +28,16 @@
 $wgExtensionCredits['other'][] = array(
        'path' => __FILE__,
        'name' => 'Upload Wizard',
-       'author' => array( 'Neil Kandalgaonkar', 'Jeroen De Dauw', 'Mark 
Holmquist', 'Ryan Kaldari', 'Michael Dale', 'Ankur Anand', 'Nischay Nahata', 
'Yuvi Panda' ),
+       'author' => array(
+               'Neil Kandalgaonkar',
+               'Jeroen De Dauw',
+               'Mark Holmquist',
+               'Ryan Kaldari',
+               'Michael Dale',
+               'Ankur Anand',
+               'Nischay Nahata',
+               'Yuvi Panda'
+       ),
        'version' => '1.3',
        'descriptionmsg' => 'uploadwizard-desc',
        'url' => 'https://www.mediawiki.org/wiki/Extension:UploadWizard'
@@ -76,11 +85,11 @@
 );
 
 $wgResourceModules['ext.uploadWizard.formDataTransport'] = array(
-        'scripts' => 'mw.FormDataTransport.js',
+       'scripts' => 'mw.FormDataTransport.js',
 ) + $uploadWizardModuleInfo;
 
 $wgResourceModules['ext.uploadWizard.iFrameTransport'] = array(
-        'scripts' => 'mw.IframeTransport.js',
+       'scripts' => 'mw.IframeTransport.js',
 ) + $uploadWizardModuleInfo;
 
 $wgResourceModules['ext.uploadWizard.apiUploadHandler'] = array(
@@ -124,7 +133,6 @@
 
 // Init the upload wizard config array
 // UploadWizard.config.php includes default configuration
-// any value can be modified in localSettings.php by setting  
$wgUploadWizardConfig['name'] = 'value;
 $wgUploadWizardConfig = array();
 
 /* Define and configure default namespaces, as defined on Mediawiki.org
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 83e4b65..6f72cfa 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -1,15 +1,14 @@
 <?php
-
-/**
- * Contains list of related resources and hooks which anticipate the use of 
Resource Loader, whenever that is released
- */
 class UploadWizardHooks {
 
        /* We define scripts here for Resource Loader */
 
        public static $modules = array(
-               // n.b. we tend not to use mediawiki.language functions, they 
are better implemented in mediawiki.language.parser.
-               // however, loading mediawiki.language will a) create the 
namespace b) load the language files with convertPlural for the current 
language and all.
+               // n.b. we tend not to use mediawiki.language functions,
+               // they are better implemented in mediawiki.language.parser.
+               // however, loading mediawiki.language will
+               // a) create the namespace
+               // b) load the language files with convertPlural for the 
current language and all.
                'ext.uploadWizard' => array(
                        'dependencies' => array(
                                'jquery.arrowSteps',
@@ -421,10 +420,10 @@
                                'mwe-upwiz-feedback-blacklist-subject',
                                'mwe-upwiz-errordialog-title',
                                'mwe-upwiz-errordialog-ok',
-                               'size-gigabytes',
-                               'size-megabytes',
-                               'size-kilobytes',
-                               'size-bytes',
+                               'size-gigabytes',
+                               'size-megabytes',
+                               'size-kilobytes',
+                               'size-bytes',
                                'mw-coolcats-confirm-new-title',
                                'mw-coolcats-confirm-new',
                                'mw-coolcats-confirm-new-ok',
@@ -493,7 +492,10 @@
                        self::$modules['ext.uploadWizard']['dependencies'][] = 
'mediawiki.api.titleblacklist';
                }
                foreach ( self::$modules as $name => $resources ) {
-                       $resourceLoader->register( $name, new 
ResourceLoaderFileModule( $resources, $localpath, $remotepath ) );
+                       $resourceLoader->register(
+                               $name,
+                               new ResourceLoaderFileModule( $resources, 
$localpath, $remotepath )
+                       );
                }
                return true;
        }
@@ -554,17 +556,24 @@
                        $ownWork = $licensingOptions['ownWork'];
                        foreach ( $ownWork['licenses'] as $license ) {
                                $licenseMessage = self::getLicenseMessage( 
$license, $licenseConfig );
-                               $licenses[wfMessage( 
'mwe-upwiz-prefs-license-own', $licenseMessage )->text()] = 'ownwork-' . 
$license;
+                               $licenseKey = wfMessage( 
'mwe-upwiz-prefs-license-own', $licenseMessage )->text();
+                               $licenses[$licenseKey] = 'ownwork-' . $license;
                        }
 
                        foreach ( UploadWizardConfig::getThirdPartyLicenses() 
as $license ) {
                                if ( $license !== 'custom' ) {
                                        $licenseMessage = 
self::getLicenseMessage( $license, $licenseConfig );
-                                       $licenses[wfMessage( 
'mwe-upwiz-prefs-license-thirdparty', $licenseMessage )->text()] = 
'thirdparty-' . $license;
+                                       $licenseKey = wfMessage( 
'mwe-upwiz-prefs-license-thirdparty', $licenseMessage )->text();
+                                       $licenses[$licenseKey] = 'thirdparty-' 
. $license;
                                }
                        }
 
-                       $licenses = array_merge( array( wfMessage( 
'mwe-upwiz-prefs-def-license-def' )->text() => 'default' ), $licenses );
+                       $licenses = array_merge(
+                               array(
+                                       wfMessage( 
'mwe-upwiz-prefs-def-license-def' )->text() => 'default'
+                               ),
+                               $licenses
+                       );
 
                        $preferences['upwiz_deflicense'] = array(
                                'type' => 'radio',
@@ -611,7 +620,11 @@
         */
        public static function getLicenseMessage( $licenseName, array 
$licenseConfig ) {
                if ( array_key_exists( 'url', $licenseConfig[$licenseName] ) ) {
-                       return wfMessage( $licenseConfig[$licenseName]['msg'], 
'', $licenseConfig[$licenseName]['url'] )->parse();
+                       return wfMessage(
+                               $licenseConfig[$licenseName]['msg'],
+                               '',
+                               $licenseConfig[$licenseName]['url']
+                       )->parse();
                }
                else {
                        return wfMessage( $licenseConfig[$licenseName]['msg'] 
)->text();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib978bc6c269239e05986a656f798bb145fc950ca
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to