diff --git a/maintenance/migratePreferences.php b/maintenance/migratePreferences.php index dda7f06..77f125c 100644 --- a/maintenance/migratePreferences.php +++ b/maintenance/migratePreferences.php @@ -17,10 +17,9 @@ require_once "$IP/maintenance/Maintenance.php"; /** * Cleans up old preference values - * @codingStandardsIgnoreStart */ class MigratePreferences extends LoggedUpdateMaintenance { - // @codingStandardsIgnoreEnd + // Previously, these constants were used by Hooks to force different per-user defaults const OPTIONS_FAKE_TRUTH = 2; const OPTIONS_FAKE_FALSE = 'fake-false'; diff --git a/tests/phpunit/LoginNotifyTest.php b/tests/phpunit/LoginNotifyTest.php index 0f4a676..8f2267b 100644 --- a/tests/phpunit/LoginNotifyTest.php +++ b/tests/phpunit/LoginNotifyTest.php @@ -4,7 +4,6 @@ use LoginNotify\LoginNotify; use \Psr\Log\NullLogger; use Wikimedia\TestingAccessWrapper; -// @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong /** * @covers \LoginNotify\LoginNotify * @group LoginNotify @@ -26,7 +25,7 @@ class LoginNotifyTest extends MediaWikiTestCase { "LoginNotifyCookieExpire" => 15552000, "LoginNotifyCookieDomain" => null, "LoginNotifyMaxCookieRecords" => 6, - "LoginNotifyCacheLoginIPExpiry" => 60*60*24*60 + "LoginNotifyCacheLoginIPExpiry" => 60 * 60 * 24 * 60 ] ); $this->inst = TestingAccessWrapper::newFromObject( new LoginNotify( @@ -214,7 +213,10 @@ class LoginNotifyTest extends MediaWikiTestCase { if ( !isset( $newCookieParts[1] ) ) { $newCookieParts[1] = ''; } - $this->assertTrue( $this->inst->isUserRecordGivenCookie( $user, $newCookieParts[0] ), "[Cookie new entry] $desc" ); + $this->assertTrue( + $this->inst->isUserRecordGivenCookie( $user, $newCookieParts[0] ), + "[Cookie new entry] $desc" + ); $this->assertEquals( $expectedNewCookie, $newCookieParts[1], "[Cookie] $desc" ); } @@ -239,7 +241,8 @@ class LoginNotifyTest extends MediaWikiTestCase { ], [ $u1, - "$cookieOtherUser.$y-.$y-abcdefg-8oerxg4l59zpiu0by7m2to1b4cjeer4.$oldYear-1234567-tpnsk00419wba6vjh1upif21qtst1cv", + "$cookieOtherUser.$y-.$y-abcdefg-8oerxg4l59zpiu0by7m2to1b4cjeer4.$oldYear-" . + "1234567-tpnsk00419wba6vjh1upif21qtst1cv", false, "$cookieOtherUser.$y-abcdefg-8oerxg4l59zpiu0by7m2to1b4cjeer4", "old values in cookie" @@ -328,4 +331,3 @@ class LoginNotifyTest extends MediaWikiTestCase { ); } } -// @codingStandardsIgnoreEnd