[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib920133c0b840c7e5729682231e155a3854d3982
---
M api/MWOAuthAPI.setup.php
M api/MWOAuthSessionProvider.php
M backend/MWOAuthConsumer.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/MWOAuthUI.hooks.php
M phpcs.xml
8 files changed, 30 insertions(+), 32 deletions(-)

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



diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index d71767c..a0007e4 100755
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -11,7 +11,7 @@
/**
 * Prevent CentralAuth from issuing centralauthtokens if we have
 * OAuth headers in this request.
-* @return boolean
+* @return bool
 */
public static function onCentralAuthAbortCentralAuthToken() {
$request = \RequestContext::getMain()->getRequest();
diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 8f9ff11..4b16f2d 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -232,7 +232,7 @@
 * @param \ApiBase $module
 * @param \User $user
 * @param string|array &$message
-* @return boolean
+* @return bool
 */
public function onApiCheckCanExecute( \ApiBase $module, \User $user, 
&$message ) {
global $wgMWOauthDisabledApiModules;
@@ -258,7 +258,7 @@
 * Record the fact that OAuth was used for anything added to 
RecentChanges.
 *
 * @param \RecentChange $rc
-* @return boolean true
+* @return bool true
 */
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 976bdce..afc3e0d 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -91,11 +91,11 @@
 * @var array
 */
public static $stageNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'proposed',
-   MWOAuthConsumer::STAGE_REJECTED => 'rejected',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'expired',
-   MWOAuthConsumer::STAGE_APPROVED => 'approved',
-   MWOAuthConsumer::STAGE_DISABLED => 'disabled',
+   self::STAGE_PROPOSED => 'proposed',
+   self::STAGE_REJECTED => 'rejected',
+   self::STAGE_EXPIRED  => 'expired',
+   self::STAGE_APPROVED => 'approved',
+   self::STAGE_DISABLED => 'disabled',
];
 
/**
@@ -104,11 +104,11 @@
 * @var array
 */
public static $stageActionNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'propose',
-   MWOAuthConsumer::STAGE_REJECTED => 'reject',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'propose',
-   MWOAuthConsumer::STAGE_APPROVED => 'approve',
-   MWOAuthConsumer::STAGE_DISABLED => 'disable',
+   self::STAGE_PROPOSED => 'propose',
+   self::STAGE_REJECTED => 'reject',
+   self::STAGE_EXPIRED  => 'propose',
+   self::STAGE_APPROVED => 'approve',
+   self::STAGE_DISABLED => 'disable',
];
 
protected static function getSchema() {
@@ -223,11 +223,11 @@
 */
public static function getAllStages() {
return [
-   MWOAuthConsumer::STAGE_PROPOSED,
-   MWOAuthConsumer::STAGE_REJECTED,
-   MWOAuthConsumer::STAGE_EXPIRED,
-   MWOAuthConsumer::STAGE_APPROVED,
-   MWOAuthConsumer::STAGE_DISABLED,
+   self::STAGE_PROPOSED,
+   self::STAGE_REJECTED,
+   self::STAGE_EXPIRED,
+   self::STAGE_APPROVED,
+   self::STAGE_DISABLED,
];
}
 
@@ -259,7 +259,7 @@
 * - Still pending approval and is owned by $user
 *
 * @param \User $user
-* @return boolean
+* @return bool
 */
public function isUsableBy( \User $user ) {
if ( $this->stage === self::STAGE_APPROVED && !$this->get( 
'ownerOnly' ) ) {
@@ -285,7 +285,7 @@
 
protected function encodeRow( \DBConnRef $db, $row ) {
// For compatibility with other wikis in the farm, un-remap 
some grants
-   foreach ( MWOAuthConsumer::$mapBackCompatGrants as $old => $new 
) {
+   foreach ( self::$mapBackCompatGrants as $old => $new ) {

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368041 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib920133c0b840c7e5729682231e155a3854d3982
---
M api/MWOAuthAPI.setup.php
M api/MWOAuthSessionProvider.php
M backend/MWOAuthConsumer.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/MWOAuthUI.hooks.php
M phpcs.xml
8 files changed, 30 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/41/368041/1

diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index d71767c..a0007e4 100755
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -11,7 +11,7 @@
/**
 * Prevent CentralAuth from issuing centralauthtokens if we have
 * OAuth headers in this request.
-* @return boolean
+* @return bool
 */
public static function onCentralAuthAbortCentralAuthToken() {
$request = \RequestContext::getMain()->getRequest();
diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 8f9ff11..4b16f2d 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -232,7 +232,7 @@
 * @param \ApiBase $module
 * @param \User $user
 * @param string|array &$message
-* @return boolean
+* @return bool
 */
public function onApiCheckCanExecute( \ApiBase $module, \User $user, 
&$message ) {
global $wgMWOauthDisabledApiModules;
@@ -258,7 +258,7 @@
 * Record the fact that OAuth was used for anything added to 
RecentChanges.
 *
 * @param \RecentChange $rc
-* @return boolean true
+* @return bool true
 */
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 976bdce..afc3e0d 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -91,11 +91,11 @@
 * @var array
 */
public static $stageNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'proposed',
-   MWOAuthConsumer::STAGE_REJECTED => 'rejected',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'expired',
-   MWOAuthConsumer::STAGE_APPROVED => 'approved',
-   MWOAuthConsumer::STAGE_DISABLED => 'disabled',
+   self::STAGE_PROPOSED => 'proposed',
+   self::STAGE_REJECTED => 'rejected',
+   self::STAGE_EXPIRED  => 'expired',
+   self::STAGE_APPROVED => 'approved',
+   self::STAGE_DISABLED => 'disabled',
];
 
/**
@@ -104,11 +104,11 @@
 * @var array
 */
public static $stageActionNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'propose',
-   MWOAuthConsumer::STAGE_REJECTED => 'reject',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'propose',
-   MWOAuthConsumer::STAGE_APPROVED => 'approve',
-   MWOAuthConsumer::STAGE_DISABLED => 'disable',
+   self::STAGE_PROPOSED => 'propose',
+   self::STAGE_REJECTED => 'reject',
+   self::STAGE_EXPIRED  => 'propose',
+   self::STAGE_APPROVED => 'approve',
+   self::STAGE_DISABLED => 'disable',
];
 
protected static function getSchema() {
@@ -223,11 +223,11 @@
 */
public static function getAllStages() {
return [
-   MWOAuthConsumer::STAGE_PROPOSED,
-   MWOAuthConsumer::STAGE_REJECTED,
-   MWOAuthConsumer::STAGE_EXPIRED,
-   MWOAuthConsumer::STAGE_APPROVED,
-   MWOAuthConsumer::STAGE_DISABLED,
+   self::STAGE_PROPOSED,
+   self::STAGE_REJECTED,
+   self::STAGE_EXPIRED,
+   self::STAGE_APPROVED,
+   self::STAGE_DISABLED,
];
}
 
@@ -259,7 +259,7 @@
 * - Still pending approval and is owned by $user
 *
 * @param \User $user
-* @return boolean
+* @return bool
 */
public function isUsableBy( \User $user ) {
if ( $this->stage === self::STAGE_APPROVED && !$this->get( 
'ownerOnly' ) ) {
@@ -285,7 +285,7 @@
 
protected function encodeRow( \DBConnRef $db, $row ) {
// For compatibility with other wikis in the farm, un-remap 
some grants
-   foreach ( MWOAuthConsumer::$mapBackCompatGrants as $old => $new 
) {
+   foreach ( self::$mapBackCompatGrants as $old => $new ) {