[MediaWiki-commits] [Gerrit] mediawiki...BounceHandler[master]: Break long lines

2017-06-02 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/356647 )

Change subject: Break long lines
..


Break long lines

Prepare to make phpcs pass

Change-Id: I3e88e147aad5a2896e190571fce354cc3a623b41
---
M BounceHandler.php
M BounceHandlerHooks.php
M includes/BounceHandlerActions.php
M includes/ProcessBounceEmails.php
M includes/ProcessBounceWithRegex.php
M includes/ProcessUnRecognizedBounces.php
M includes/VerpAddressGenerator.php
M tests/VERPEncodeDecodeTest.php
8 files changed, 51 insertions(+), 26 deletions(-)

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



diff --git a/BounceHandler.php b/BounceHandler.php
index abe09c4..fb53a70 100644
--- a/BounceHandler.php
+++ b/BounceHandler.php
@@ -4,10 +4,11 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['BounceHandler'] = __DIR__ . '/i18n';
/* wfWarn(
-   'Deprecated PHP entry point used for BounceHandler extension. 
Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for BounceHandler extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
return;
 } else {
die( 'This version of the BounceHandler extension requires MediaWiki 
1.25+' );
-}
\ No newline at end of file
+}
diff --git a/BounceHandlerHooks.php b/BounceHandlerHooks.php
index 3976953..19130d1 100644
--- a/BounceHandlerHooks.php
+++ b/BounceHandlerHooks.php
@@ -98,9 +98,15 @@
 */
public static function LoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
$updater->addExtensionTable( 'bounce_records', __DIR__ . 
'/sql/bounce_records.sql' );
-   $updater->modifyExtensionField( 'bounce_records', 'br_user', 
__DIR__ . '/sql/alter_user_column.sql' );
-   $updater->addExtensionIndex( 'bounce_records', 
'br_mail_timestamp', __DIR__ .'/sql/create_index_mail_timestamp.sql' );
-   $updater->addExtensionIndex( 'bounce_records', 'br_timestamp', 
__DIR__ .'/sql/create_index_timestamp.sql' );
+   $updater->modifyExtensionField(
+   'bounce_records', 'br_user', __DIR__ . 
'/sql/alter_user_column.sql'
+   );
+   $updater->addExtensionIndex(
+   'bounce_records', 'br_mail_timestamp', __DIR__ 
.'/sql/create_index_mail_timestamp.sql'
+   );
+   $updater->addExtensionIndex(
+   'bounce_records', 'br_timestamp', __DIR__ 
.'/sql/create_index_timestamp.sql'
+   );
 
return true;
}
diff --git a/includes/BounceHandlerActions.php 
b/includes/BounceHandlerActions.php
index ad0bf8f..cb5a0f3 100644
--- a/includes/BounceHandlerActions.php
+++ b/includes/BounceHandlerActions.php
@@ -38,13 +38,15 @@
 
/**
 * @param string $wikiId The database id of the failing recipient
-* @param int $bounceRecordPeriod Time period for which bounce 
activities are considered before un-subscribing
+* @param int $bounceRecordPeriod Time period for which bounce 
activities are considered
+*  before un-subscribing
 * @param int $bounceRecordLimit The number of bounce allowed in the 
bounceRecordPeriod.
 * @param bool $bounceHandlerUnconfirmUsers Enable/Disable user 
un-subscribe action
 * @param string $emailRaw The raw bounce Email
 * @throws Exception
 */
-   public function __construct( $wikiId, $bounceRecordPeriod, 
$bounceRecordLimit, $bounceHandlerUnconfirmUsers, $emailRaw
+   public function __construct(
+   $wikiId, $bounceRecordPeriod, $bounceRecordLimit, 
$bounceHandlerUnconfirmUsers, $emailRaw
) {
if ( $wikiId !== wfWikiID() ) {
// We want to use the User class methods, which make no 
sense on the wrong wiki
@@ -110,7 +112,8 @@
}
 
/**
-* Function to inject Echo notification to the last source of bounce 
for an unsubscribed Global user
+* Function to inject Echo notification to the last source of bounce 
for an
+* unsubscribed Global user
 *
 * @param $bounceUserId
 * @param $originalEmail
@@ -149,7 +152,8 @@
$caUser->saveSettings();
$this->notifyGlobalUser( $bounceUserId, 
$originalEmail );
wfDebugLog( 'BounceHandler',
-   "Un-subscribed global user 
{$caUser->getName()} <$originalEmail> for exceeding Bounce Limit 
$this->bounceRecordLimit.\nProcessed Headers:\n" .
+   "Un-subscribed global user 
{$caUser->getName()} <$originalEmail> for " .
+  

[MediaWiki-commits] [Gerrit] mediawiki...BounceHandler[master]: Break long lines

2017-06-01 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/356647 )

Change subject: Break long lines
..

Break long lines

Prepare to make phpcs pass

Change-Id: I3e88e147aad5a2896e190571fce354cc3a623b41
---
M BounceHandler.php
M BounceHandlerHooks.php
M includes/BounceHandlerActions.php
M includes/ProcessBounceEmails.php
M includes/ProcessBounceWithRegex.php
M includes/ProcessUnRecognizedBounces.php
M includes/VerpAddressGenerator.php
M tests/VERPEncodeDecodeTest.php
8 files changed, 51 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler 
refs/changes/47/356647/1

diff --git a/BounceHandler.php b/BounceHandler.php
index abe09c4..fb53a70 100644
--- a/BounceHandler.php
+++ b/BounceHandler.php
@@ -4,10 +4,11 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['BounceHandler'] = __DIR__ . '/i18n';
/* wfWarn(
-   'Deprecated PHP entry point used for BounceHandler extension. 
Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for BounceHandler extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
return;
 } else {
die( 'This version of the BounceHandler extension requires MediaWiki 
1.25+' );
-}
\ No newline at end of file
+}
diff --git a/BounceHandlerHooks.php b/BounceHandlerHooks.php
index 3976953..19130d1 100644
--- a/BounceHandlerHooks.php
+++ b/BounceHandlerHooks.php
@@ -98,9 +98,15 @@
 */
public static function LoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
$updater->addExtensionTable( 'bounce_records', __DIR__ . 
'/sql/bounce_records.sql' );
-   $updater->modifyExtensionField( 'bounce_records', 'br_user', 
__DIR__ . '/sql/alter_user_column.sql' );
-   $updater->addExtensionIndex( 'bounce_records', 
'br_mail_timestamp', __DIR__ .'/sql/create_index_mail_timestamp.sql' );
-   $updater->addExtensionIndex( 'bounce_records', 'br_timestamp', 
__DIR__ .'/sql/create_index_timestamp.sql' );
+   $updater->modifyExtensionField(
+   'bounce_records', 'br_user', __DIR__ . 
'/sql/alter_user_column.sql'
+   );
+   $updater->addExtensionIndex(
+   'bounce_records', 'br_mail_timestamp', __DIR__ 
.'/sql/create_index_mail_timestamp.sql'
+   );
+   $updater->addExtensionIndex(
+   'bounce_records', 'br_timestamp', __DIR__ 
.'/sql/create_index_timestamp.sql'
+   );
 
return true;
}
diff --git a/includes/BounceHandlerActions.php 
b/includes/BounceHandlerActions.php
index ad0bf8f..cb5a0f3 100644
--- a/includes/BounceHandlerActions.php
+++ b/includes/BounceHandlerActions.php
@@ -38,13 +38,15 @@
 
/**
 * @param string $wikiId The database id of the failing recipient
-* @param int $bounceRecordPeriod Time period for which bounce 
activities are considered before un-subscribing
+* @param int $bounceRecordPeriod Time period for which bounce 
activities are considered
+*  before un-subscribing
 * @param int $bounceRecordLimit The number of bounce allowed in the 
bounceRecordPeriod.
 * @param bool $bounceHandlerUnconfirmUsers Enable/Disable user 
un-subscribe action
 * @param string $emailRaw The raw bounce Email
 * @throws Exception
 */
-   public function __construct( $wikiId, $bounceRecordPeriod, 
$bounceRecordLimit, $bounceHandlerUnconfirmUsers, $emailRaw
+   public function __construct(
+   $wikiId, $bounceRecordPeriod, $bounceRecordLimit, 
$bounceHandlerUnconfirmUsers, $emailRaw
) {
if ( $wikiId !== wfWikiID() ) {
// We want to use the User class methods, which make no 
sense on the wrong wiki
@@ -110,7 +112,8 @@
}
 
/**
-* Function to inject Echo notification to the last source of bounce 
for an unsubscribed Global user
+* Function to inject Echo notification to the last source of bounce 
for an
+* unsubscribed Global user
 *
 * @param $bounceUserId
 * @param $originalEmail
@@ -149,7 +152,8 @@
$caUser->saveSettings();
$this->notifyGlobalUser( $bounceUserId, 
$originalEmail );
wfDebugLog( 'BounceHandler',
-   "Un-subscribed global user 
{$caUser->getName()} <$originalEmail> for exceeding Bounce Limit 
$this->bounceRecordLimit.\nProcessed Headers:\n" .
+   "Un-subscribed global user 
{$caUser->getName()} <$originalEmail> for " .