[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Handle simply newlines

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

Change subject: Handle simply newlines
..


Handle simply newlines

Remove multiple empty lines and add some lines to functions

Prepare to make phpcs pass

Change-Id: Idc63e169b2e9203baaa2d2df14f8f4b2f463793c
---
M includes/CentralAuthPlugin.php
M includes/CentralAuthUser.php
M includes/EmailableUser.php
M includes/WikiSet.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialWikiSets.php
M maintenance/migrateAccount.php
M tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
M tests/phpunit/CentralAuthPluginUsingDatabaseTest.php
M tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
12 files changed, 26 insertions(+), 21 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index d531601..e984a6d 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -157,7 +157,6 @@
return true;
}
 
-
/**
 * Check the user's password.
 *
@@ -224,7 +223,6 @@
}
return true;
}
-
 
/**
 * Return true if the wiki should create a new local account 
automatically
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 66717e7..690cd23 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2561,7 +2561,6 @@
__METHOD__ . " was called for a global user 
that doesn't exist ('$this->mName')." );
}
 
-
if ( $resetAuthToken ) {
$this->resetAuthToken();
}
diff --git a/includes/EmailableUser.php b/includes/EmailableUser.php
index f568566..3dca870 100644
--- a/includes/EmailableUser.php
+++ b/includes/EmailableUser.php
@@ -69,7 +69,6 @@
$mergeAccountUrl = $this->getTokenUrl( 'MergeAccount', 
$token );
}
 
-
$invalidateURL = $this->invalidationTokenUrl( $token );
$this->saveSettings();
 
diff --git a/includes/WikiSet.php b/includes/WikiSet.php
index 8ed4b94..0dd32e7 100755
--- a/includes/WikiSet.php
+++ b/includes/WikiSet.php
@@ -38,42 +38,58 @@
 * @param $k string
 * @return string
 */
-   protected static function memcKey( $k ) { return "wikiset:{$k}"; }
+   protected static function memcKey( $k ) {
+   return "wikiset:{$k}";
+   }
 
/**
 * @return int
 */
-   public function getId() { return $this->mId; }
+   public function getId() {
+   return $this->mId;
+   }
 
/**
 * @return bool
 */
-   public function exists() { return (bool)$this->getID(); }
+   public function exists() {
+   return (bool)$this->getID();
+   }
 
/**
 * @return string
 */
-   public function getName() { return $this->mName; }
+   public function getName() {
+   return $this->mName;
+   }
 
/**
 * @param string $n
 */
-   public function setName( $n ) { $this->setDbField( 'ws_name', $n ); }
+   public function setName( $n ) {
+   $this->setDbField( 'ws_name', $n );
+   }
 
/**
 * @return array
 */
-   public function getWikisRaw() { return $this->mWikis; }
+   public function getWikisRaw() {
+   return $this->mWikis;
+   }
 
/**
 * @param string $w
 */
-   public function setWikisRaw( $w ) { $this->setDbField( 'ws_wikis', $w 
); }
+   public function setWikisRaw( $w ) {
+   $this->setDbField( 'ws_wikis', $w );
+   }
 
/**
 * @return string
 */
-   public function getType() { return $this->mType; }
+   public function getType() {
+   return $this->mType;
+   }
 
/**
 * @param string $t
diff --git a/includes/specials/SpecialCentralAutoLogin.php 
b/includes/specials/SpecialCentralAutoLogin.php
index 57ff39e..1a854f5 100644
--- a/includes/specials/SpecialCentralAutoLogin.php
+++ b/includes/specials/SpecialCentralAutoLogin.php
@@ -310,7 +310,6 @@
return;
}
 
-
if ( $gu_id <= 0 ) {
$this->doFinalOutput( false, 'Not centrally 
logged in', self::getInlineScript( 'anon-set.js' ) );
return;
diff --git a/includes/specials/SpecialGlobalGroupPermissions.php 
b/includes/specials/SpecialGlobalGroupPermissions.php
index 56ea2ca..0ed6bce 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Handle simply newlines

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

Change subject: Handle simply newlines
..

Handle simply newlines

Remove multiple empty lines and add some lines to functions

Prepare to make phpcs pass

Change-Id: Idc63e169b2e9203baaa2d2df14f8f4b2f463793c
---
M includes/CentralAuthPlugin.php
M includes/CentralAuthUser.php
M includes/EmailableUser.php
M includes/WikiSet.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialWikiSets.php
M maintenance/migrateAccount.php
M tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
M tests/phpunit/CentralAuthPluginUsingDatabaseTest.php
M tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
12 files changed, 26 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/93/358093/1

diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index d531601..e984a6d 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -157,7 +157,6 @@
return true;
}
 
-
/**
 * Check the user's password.
 *
@@ -224,7 +223,6 @@
}
return true;
}
-
 
/**
 * Return true if the wiki should create a new local account 
automatically
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 66717e7..690cd23 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2561,7 +2561,6 @@
__METHOD__ . " was called for a global user 
that doesn't exist ('$this->mName')." );
}
 
-
if ( $resetAuthToken ) {
$this->resetAuthToken();
}
diff --git a/includes/EmailableUser.php b/includes/EmailableUser.php
index f568566..3dca870 100644
--- a/includes/EmailableUser.php
+++ b/includes/EmailableUser.php
@@ -69,7 +69,6 @@
$mergeAccountUrl = $this->getTokenUrl( 'MergeAccount', 
$token );
}
 
-
$invalidateURL = $this->invalidationTokenUrl( $token );
$this->saveSettings();
 
diff --git a/includes/WikiSet.php b/includes/WikiSet.php
index 8ed4b94..0dd32e7 100755
--- a/includes/WikiSet.php
+++ b/includes/WikiSet.php
@@ -38,42 +38,58 @@
 * @param $k string
 * @return string
 */
-   protected static function memcKey( $k ) { return "wikiset:{$k}"; }
+   protected static function memcKey( $k ) {
+   return "wikiset:{$k}";
+   }
 
/**
 * @return int
 */
-   public function getId() { return $this->mId; }
+   public function getId() {
+   return $this->mId;
+   }
 
/**
 * @return bool
 */
-   public function exists() { return (bool)$this->getID(); }
+   public function exists() {
+   return (bool)$this->getID();
+   }
 
/**
 * @return string
 */
-   public function getName() { return $this->mName; }
+   public function getName() {
+   return $this->mName;
+   }
 
/**
 * @param string $n
 */
-   public function setName( $n ) { $this->setDbField( 'ws_name', $n ); }
+   public function setName( $n ) {
+   $this->setDbField( 'ws_name', $n );
+   }
 
/**
 * @return array
 */
-   public function getWikisRaw() { return $this->mWikis; }
+   public function getWikisRaw() {
+   return $this->mWikis;
+   }
 
/**
 * @param string $w
 */
-   public function setWikisRaw( $w ) { $this->setDbField( 'ws_wikis', $w 
); }
+   public function setWikisRaw( $w ) {
+   $this->setDbField( 'ws_wikis', $w );
+   }
 
/**
 * @return string
 */
-   public function getType() { return $this->mType; }
+   public function getType() {
+   return $this->mType;
+   }
 
/**
 * @param string $t
diff --git a/includes/specials/SpecialCentralAutoLogin.php 
b/includes/specials/SpecialCentralAutoLogin.php
index 57ff39e..1a854f5 100644
--- a/includes/specials/SpecialCentralAutoLogin.php
+++ b/includes/specials/SpecialCentralAutoLogin.php
@@ -310,7 +310,6 @@
return;
}
 
-
if ( $gu_id <= 0 ) {
$this->doFinalOutput( false, 'Not centrally 
logged in', self::getInlineScript( 'anon-set.js' ) );
return;
diff --git a/includes/specials/SpecialGlobalGroupPermissions.php 
b/includes/specials/SpecialGlobalGroupPermissions.php
index 56ea2ca..0ed6bce 100644
---