diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 046297f5ef..332103cf80 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1906,7 +1906,7 @@ App::get('/v1/account/targets/:targetId') ->param('targetId', '', new UID(), 'Target ID.') ->inject('user') ->inject('response') - ->action(function (string $targetId, Document $user, Response $response) { + ->action(function (string $targetId, Document $user, Response $response) { $target = $user->find('$id', $targetId, 'targets'); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index e5599c762d..7984fb24d9 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1256,7 +1256,7 @@ App::patch('/v1/users/:userId/targets/:targetId/identifier') $events ->setParam('userId', $userId) - ->setParam ('targetId', $targetId); + ->setParam('targetId', $targetId); $response ->dynamic($target, Response::MODEL_TARGET); diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index d429854ec8..39fa8d0fa5 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -119,7 +119,7 @@ class AccountCustomClientTest extends Scope /** * @depends testCreateAccountSession */ - public function testCreateAccountTarget(array $data): array + public function testCreateAccountTarget(array $data): array { $session = $data['session'] ?? ''; $apiKey = $this->getProject()['apiKey']; @@ -156,7 +156,7 @@ class AccountCustomClientTest extends Scope { $session = $data['session'] ?? ''; $target = $data['target']; - $response = $this->client->call(Client::METHOD_PATCH, '/account/targets/' . $target['$id'] .'/identifier', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/account/targets/' . $target['$id'] . '/identifier', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -193,7 +193,7 @@ class AccountCustomClientTest extends Scope $session = $data['session'] ?? ''; $target = $data['target']; - $response = $this->client->call(Client::METHOD_GET, '/account/targets/' .$target['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/account/targets/' . $target['$id'], array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -211,7 +211,7 @@ class AccountCustomClientTest extends Scope $session = $data['session'] ?? ''; $target = $data['target']; - $response = $this->client->call(Client::METHOD_DELETE, '/account/targets/' .$target['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/account/targets/' . $target['$id'], array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Messaging/MessagingServerTest.php b/tests/e2e/Services/Messaging/MessagingServerTest.php index 9bc9f93caf..7b93ab29ac 100644 --- a/tests/e2e/Services/Messaging/MessagingServerTest.php +++ b/tests/e2e/Services/Messaging/MessagingServerTest.php @@ -187,5 +187,4 @@ class MessagingServerTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); } } - } diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 1d859a626d..947a3a5cd9 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -1214,7 +1214,7 @@ trait UsersBase /** * @depends testGetUser */ - public function testCreateUserTarget(array $data): array + public function testCreateUserTarget(array $data): array { $provider = $this->client->call(Client::METHOD_POST, '/messaging/providers/sendgrid', [ 'content-type' => 'application/json', @@ -1239,13 +1239,13 @@ trait UsersBase $this->assertEquals('my-token', $response['body']['identifier']); return $response['body']; } - + /** * @depends testCreateUserTarget */ public function testUpdateUserTarget(array $data): array { - $response = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/targets/' . $data['$id'] .'/identifier', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/targets/' . $data['$id'] . '/identifier', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1256,7 +1256,7 @@ trait UsersBase $this->assertEquals('my-updated-token', $response['body']['identifier']); return $response['body']; } - + /** * @depends testGetUser */ @@ -1276,7 +1276,7 @@ trait UsersBase */ public function testGetUserTarget(array $data) { - $response = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/targets/' .$data['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/targets/' . $data['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1290,7 +1290,7 @@ trait UsersBase */ public function testDeleteUserTarget(array $data) { - $response = $this->client->call(Client::METHOD_DELETE, '/users/' . $data['userId'] . '/targets/' .$data['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/users/' . $data['userId'] . '/targets/' . $data['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'],