apply phpcs PSR2.Methods.FunctionClosingBrace PSR12.Classes.ClassInstantiation

This commit is contained in:
Spine
2024-04-07 19:46:30 +02:00
parent b9d7b93d5c
commit 338a1feb54
596 changed files with 1624 additions and 1628 deletions
+6 -6
View File
@@ -22,7 +22,7 @@ class UserCreateTest extends TestCase {
$password = randomString(40);
$adminComment = 'Created by tests/phpunit/UserCreateTest.php';
$this->user = (new \Gazelle\UserCreator)
$this->user = (new \Gazelle\UserCreator())
->setUsername($name)
->setEmail($email)
->setPassword($password)
@@ -54,14 +54,14 @@ class UserCreateTest extends TestCase {
$_SERVER['REMOTE_ADDR'] = '127.0.0.100';
$_SERVER['HTTP_USER_AGENT'] = 'phpunit';
$this->user = (new \Gazelle\UserCreator)
$this->user = (new \Gazelle\UserCreator())
->setUsername('phpunit.' . randomString(10))
->setEmail('[email protected]')
->setPassword('password')
->setIpaddr($_SERVER['REMOTE_ADDR'])
->setAdminComment('phpunit test login')
->create();
$login = new Gazelle\Login;
$login = new Gazelle\Login();
$watch = new Gazelle\LoginWatch($_SERVER['REMOTE_ADDR']);
$watch->clearAttempts();
@@ -85,7 +85,7 @@ class UserCreateTest extends TestCase {
public function testZeroFailure(): void {
$_SERVER['HTTP_USER_AGENT'] = 'phpunit';
$creator = (new \Gazelle\UserCreator)
$creator = (new \Gazelle\UserCreator())
->setUsername('0')
->setEmail("[email protected]")
->setPassword(randomString(20))
@@ -99,7 +99,7 @@ class UserCreateTest extends TestCase {
public function testNameFailure(): void {
$_SERVER['HTTP_USER_AGENT'] = 'phpunit';
$creator = (new \Gazelle\UserCreator)
$creator = (new \Gazelle\UserCreator())
->setUsername(randomString(21))
->setEmail("[email protected]")
->setPassword(randomString(20))
@@ -112,7 +112,7 @@ class UserCreateTest extends TestCase {
public function testNameTrim(): void {
$_SERVER['HTTP_USER_AGENT'] = 'phpunit';
$this->user = (new \Gazelle\UserCreator)
$this->user = (new \Gazelle\UserCreator())
->setUsername(' ' . randomString(6))
->setEmail("[email protected]")
->setPassword(randomString(20))