mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-11-23 22:45:59 +00:00
build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: Ibad3f653c0b78249eff781596c567182cce281c6
This commit is contained in:
parent
7ae7e22e54
commit
0cf9669e85
|
@ -5,7 +5,7 @@
|
|||
"type": "mediawiki-extension",
|
||||
"description": "MediaWiki extension to notify users if someone tries to login to their account",
|
||||
"require-dev": {
|
||||
"mediawiki/mediawiki-codesniffer": "41.0.0",
|
||||
"mediawiki/mediawiki-codesniffer": "43.0.0",
|
||||
"mediawiki/mediawiki-phan-config": "0.14.0",
|
||||
"mediawiki/minus-x": "1.1.1",
|
||||
"php-parallel-lint/php-console-highlighter": "1.0.0",
|
||||
|
@ -23,5 +23,10 @@
|
|||
],
|
||||
"phan": "phan -d . --long-progress-bar",
|
||||
"phpcs": "phpcs -sp --cache"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -659,7 +659,7 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
*/
|
||||
private function setLoginCookie( User $user ) {
|
||||
$cookie = $this->getPrevLoginCookie( $user->getRequest() );
|
||||
list( , $newCookie ) = $this->checkAndGenerateCookie( $user, $cookie );
|
||||
[ , $newCookie ] = $this->checkAndGenerateCookie( $user, $cookie );
|
||||
$expire = $this->getCurrentTime() + $this->config->get( 'LoginNotifyCookieExpire' );
|
||||
$resp = $user->getRequest()->response();
|
||||
$resp->setCookie(
|
||||
|
@ -874,7 +874,7 @@ class LoginNotify implements LoggerAwareInterface {
|
|||
if ( $cookie === '' ) {
|
||||
$result = self::USER_NO_INFO;
|
||||
} else {
|
||||
list( $userKnown, ) = $this->checkAndGenerateCookie( $user, $cookie );
|
||||
[ $userKnown, ] = $this->checkAndGenerateCookie( $user, $cookie );
|
||||
$result = $userKnown ? self::USER_KNOWN : self::USER_NOT_KNOWN;
|
||||
}
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class LoginNotifyTest extends MediaWikiIntegrationTestCase {
|
|||
) {
|
||||
$this->setUpLoginNotify();
|
||||
$user = $this->userFactory->newFromName( 'Foo' );
|
||||
list( $actualSeenBefore, $actualNewCookie ) =
|
||||
[ $actualSeenBefore, $actualNewCookie ] =
|
||||
$this->inst->checkAndGenerateCookie( $user, $cookie );
|
||||
|
||||
$this->assertEquals( $expectedSeenBefore, $actualSeenBefore,
|
||||
|
|
Loading…
Reference in a new issue