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

Change subject: build: fix a couple whitespace for CodeSniffer
......................................................................


build: fix a couple whitespace for CodeSniffer

Brace positions and indenting

Fix closing curly bracket onto newline

Consistent validation callback parameter naming

The PHP CodeSniffer was complaining about a couple misaligned closing
braces. Realign them for nice indentation.

Change-Id: I986b498f3a13abe591748bfab1d2fdda57b8a913
---
M SpecialOverrideThrottle.php
1 file changed, 15 insertions(+), 13 deletions(-)

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



diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php
index f21c20c..d2d3811 100644
--- a/SpecialOverrideThrottle.php
+++ b/SpecialOverrideThrottle.php
@@ -66,11 +66,11 @@
                                'other' => $this->msg( 'ipbother' )->text(),
                                'filter-callback' => 
'SpecialBlock::parseExpiryInput',
                                'validation-callback' => function ( $value ) {
-                                               if ( !$value ) {
-                                                       return $this->msg( 
'throttleoverride-validation-expiryinvalid' )->parse();
-                                               }
-                                               return true;
-                                       },
+                                       if ( !$value ) {
+                                               return $this->msg( 
'throttleoverride-validation-expiryinvalid' )->parse();
+                                       }
+                                       return true;
+                               },
                                'default' => $this->msg( 'ipb-default-expiry' 
)->inContentLanguage()->text()
                        ],
                        'Reason' => [
@@ -81,12 +81,12 @@
                                'type' => 'multiselect',
                                'label-message' => 'throttleoverride-types',
                                'options' => $throttles,
-                               'validation-callback' => function ( $input ) {
-                                               if ( !count( $input ) ) {
-                                                       return $this->msg( 
'throttleoverride-validation-notypes' )->parse();
-                                               }
-                                               return true;
-                                       },
+                               'validation-callback' => function ( $value ) {
+                                       if ( !count( $value ) ) {
+                                               return $this->msg( 
'throttleoverride-validation-notypes' )->parse();
+                                       }
+                                       return true;
+                               },
                        ]
                ];
        }
@@ -142,12 +142,14 @@
 
                        if ( IP::isIPv4( $ip ) && $range < 
$wgThrottleOverrideCIDRLimit['IPv4'] ) {
                                $status->fatal( 
'throttleoverride-validation-rangetoolarge',
-                                       $wgThrottleOverrideCIDRLimit['IPv4'] );
+                                       $wgThrottleOverrideCIDRLimit['IPv4']
+                               );
                        }
 
                        if ( IP::isIPv6( $ip ) && $range < 
$wgThrottleOverrideCIDRLimit['IPv6'] ) {
                                $status->fatal( 
'throttleoverride-validation-rangetoolarge',
-                                       $wgThrottleOverrideCIDRLimit['IPv6'] );
+                                       $wgThrottleOverrideCIDRLimit['IPv6']
+                               );
                        }
                }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I986b498f3a13abe591748bfab1d2fdda57b8a913
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ThrottleOverride
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Glaisher <glaisher.w...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to