[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/367942 ) Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 .. build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 Change-Id: I36ab81e99ef5d3e01ffa045d47d95cc9c4ab50f6 --- M composer.json M includes/CentralAuthUser.php M includes/CentralAuthUtils.php M phpcs.xml 4 files changed, 11 insertions(+), 13 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/composer.json b/composer.json index 4f55859..bf202bf 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.10.0" + "mediawiki/mediawiki-codesniffer": "0.10.1" }, "scripts": { "fix": "phpcbf", diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php index a09380b..d752899 100644 --- a/includes/CentralAuthUser.php +++ b/includes/CentralAuthUser.php @@ -279,7 +279,7 @@ ); if ( $name !== false ) { - return CentralAuthUser::getInstanceByName( $name ); + return self::getInstanceByName( $name ); } else { return false; } @@ -300,7 +300,7 @@ ); if ( $name !== false ) { - return CentralAuthUser::getMasterInstanceByName( $name ); + return self::getMasterInstanceByName( $name ); } else { return false; } diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 57bc6d1..b4d8100 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -178,9 +178,9 @@ * @return array */ public static function getCentralSessionById( $id ) { - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); $stime = microtime( true ); - $data = CentralAuthUtils::getSessionCache()->get( $key ) ?: []; + $data = self::getSessionCache()->get( $key ) ?: []; $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( 'centralauth.session.read', $real ); @@ -206,10 +206,10 @@ $id = is_string( $reset ) ? $reset : MWCryptRand::generateHex( 32 ); } $data['sessionId'] = $id; - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); // Copy certain keys from the existing session, if any (T124821) - $existing = CentralAuthUtils::getSessionCache()->get( $key ); + $existing = self::getSessionCache()->get( $key ); if ( is_array( $existing ) ) { $data += array_intersect_key( $existing, $keepKeys ); } @@ -217,7 +217,7 @@ if ( $data !== $existing || !isset( $data['expiry'] ) || $data['expiry'] < time() + 32100 ) { $data['expiry'] = time() + 86400; $stime = microtime( true ); - CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); + self::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( 'centralauth.session.write', $real ); @@ -241,9 +241,9 @@ $id = $session->get( 'CentralAuth::centralSessionId' ); if ( $id !== null ) { - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); $stime = microtime( true ); - CentralAuthUtils::getSessionCache()->delete( $key ); + self::getSessionCache()->delete( $key ); $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( "centralauth.session.delete", $real ); diff --git a/phpcs.xml b/phpcs.xml index 25af500..457f48b 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,7 @@ - CentralAuth.*alias.php + CentralAuth\.*alias\.php @@ -16,6 +16,4 @@ . - vendor - node_modules -- To
[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/367942 ) Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 .. build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 Change-Id: I36ab81e99ef5d3e01ffa045d47d95cc9c4ab50f6 --- M composer.json M includes/CentralAuthUser.php M includes/CentralAuthUtils.php M phpcs.xml 4 files changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/42/367942/1 diff --git a/composer.json b/composer.json index 4f55859..bf202bf 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.10.0" + "mediawiki/mediawiki-codesniffer": "0.10.1" }, "scripts": { "fix": "phpcbf", diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php index a09380b..d752899 100644 --- a/includes/CentralAuthUser.php +++ b/includes/CentralAuthUser.php @@ -279,7 +279,7 @@ ); if ( $name !== false ) { - return CentralAuthUser::getInstanceByName( $name ); + return self::getInstanceByName( $name ); } else { return false; } @@ -300,7 +300,7 @@ ); if ( $name !== false ) { - return CentralAuthUser::getMasterInstanceByName( $name ); + return self::getMasterInstanceByName( $name ); } else { return false; } diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 57bc6d1..b4d8100 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -178,9 +178,9 @@ * @return array */ public static function getCentralSessionById( $id ) { - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); $stime = microtime( true ); - $data = CentralAuthUtils::getSessionCache()->get( $key ) ?: []; + $data = self::getSessionCache()->get( $key ) ?: []; $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( 'centralauth.session.read', $real ); @@ -206,10 +206,10 @@ $id = is_string( $reset ) ? $reset : MWCryptRand::generateHex( 32 ); } $data['sessionId'] = $id; - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); // Copy certain keys from the existing session, if any (T124821) - $existing = CentralAuthUtils::getSessionCache()->get( $key ); + $existing = self::getSessionCache()->get( $key ); if ( is_array( $existing ) ) { $data += array_intersect_key( $existing, $keepKeys ); } @@ -217,7 +217,7 @@ if ( $data !== $existing || !isset( $data['expiry'] ) || $data['expiry'] < time() + 32100 ) { $data['expiry'] = time() + 86400; $stime = microtime( true ); - CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); + self::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( 'centralauth.session.write', $real ); @@ -241,9 +241,9 @@ $id = $session->get( 'CentralAuth::centralSessionId' ); if ( $id !== null ) { - $key = CentralAuthUtils::memcKey( 'session', $id ); + $key = self::memcKey( 'session', $id ); $stime = microtime( true ); - CentralAuthUtils::getSessionCache()->delete( $key ); + self::getSessionCache()->delete( $key ); $real = microtime( true ) - $stime; MediaWikiServices::getInstance() ->getStatsdDataFactory()->timing( "centralauth.session.delete", $real ); diff --git a/phpcs.xml b/phpcs.xml index 25af500..457f48b 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,7 @@ - CentralAuth.*alias.php + CentralAuth\.*alias\.php @@ -16,6 +16,4 @@ . - vendor -