From 20e87cb82f3725547b67c3d8de7604251571592e Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 Jan 2025 13:39:16 +0900 Subject: [PATCH] Run Linter --- app/controllers/api/account.php | 2 +- app/controllers/api/avatars.php | 2 +- app/controllers/api/console.php | 2 +- app/controllers/api/databases.php | 2 +- app/controllers/api/functions.php | 2 +- app/controllers/api/graphql.php | 2 +- app/controllers/api/health.php | 2 +- app/controllers/api/locale.php | 2 +- app/controllers/api/messaging.php | 2 +- app/controllers/api/migrations.php | 9 +-------- app/controllers/api/project.php | 2 +- app/controllers/api/projects.php | 2 +- app/controllers/api/storage.php | 2 +- app/controllers/api/teams.php | 2 +- app/controllers/api/users.php | 2 +- app/controllers/general.php | 2 +- src/Appwrite/GraphQL/Schema.php | 2 +- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- src/Appwrite/Platform/Tasks/Specs.php | 2 +- src/Appwrite/SDK/AuthType.php | 2 +- src/Appwrite/SDK/ContentType.php | 2 +- src/Appwrite/SDK/Method.php | 2 +- src/Appwrite/SDK/MethodType.php | 2 +- src/Appwrite/SDK/Response.php | 2 +- src/Appwrite/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/Specification/Format/Swagger2.php | 2 +- 26 files changed, 26 insertions(+), 33 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 727ed746a4..80c2b69ba3 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -4894,4 +4894,4 @@ App::delete('/v1/account/identities/:identityId') ->setPayload($response->output($identity, Response::MODEL_IDENTITY)); return $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 2b0f7d9e06..94a3fb374d 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -1276,4 +1276,4 @@ App::get('/v1/cards/cloud-og') ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days ->setContentType('image/png') ->file($baseImage->getImageBlob()); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index 77ba67e6e1..9a41f67724 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -125,4 +125,4 @@ App::post('/v1/console/assistant') curl_close($ch); $response->chunk('', true); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index b4635128c3..4107614fa0 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -4415,4 +4415,4 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') 'documentsTotal' => $usage[$metrics[0]]['total'], 'documents' => $usage[$metrics[0]]['data'], ]), Response::MODEL_USAGE_COLLECTION); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 9b6f92ed5b..205f96072e 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -2851,4 +2851,4 @@ App::get('/v1/functions/templates/:templateId') } $response->dynamic(new Document($template), Response::MODEL_TEMPLATE_FUNCTION); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 80a17db7cb..72951b608e 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -331,4 +331,4 @@ App::shutdown() ->inject('project') ->action(function (Document $project) { Schema::setDirty($project->getId()); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 787bc71ac8..1db4713311 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -1054,4 +1054,4 @@ App::get('/v1/health/stats') // Currently only used internally 'memory_used_peak_human' => $cacheStats['used_memory_peak_human'] ?? 0, ], ]); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 65f719f914..5b4c1ac47f 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -294,4 +294,4 @@ App::get('/v1/locale/languages') $list = array_map(fn ($node) => new Document($node), $list); $response->dynamic(new Document(['languages' => $list, 'total' => \count($list)]), Response::MODEL_LANGUAGE_LIST); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index c80da75801..d7d3750ccf 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -4254,4 +4254,4 @@ App::delete('/v1/messaging/messages/:messageId') ->setPayload($response->output($message, Response::MODEL_MESSAGE)); $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 670628de62..ac149ac8eb 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -3,19 +3,14 @@ use Appwrite\Event\Event; use Appwrite\Event\Migration; use Appwrite\Extend\Exception; -use Appwrite\Permission; -use Appwrite\Role; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; -use Appwrite\SDK\MethodType; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Migrations; -use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Database\Database; -use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Helpers\ID; @@ -26,9 +21,7 @@ use Utopia\Migration\Sources\Appwrite; use Utopia\Migration\Sources\Firebase; use Utopia\Migration\Sources\NHost; use Utopia\Migration\Sources\Supabase; -use Utopia\System\System; use Utopia\Validator\ArrayList; -use Utopia\Validator\Host; use Utopia\Validator\Integer; use Utopia\Validator\Text; use Utopia\Validator\URL; @@ -673,4 +666,4 @@ App::delete('/v1/migrations/:migrationId') $queueForEvents->setParam('migrationId', $migration->getId()); $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 50ef982799..2fc6578c2b 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -570,4 +570,4 @@ App::delete('/v1/project/variables/:variableId') } $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 896e708327..c40d7601c4 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2429,4 +2429,4 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') 'replyTo' => $template['replyTo'], 'message' => $template['message'] ]), Response::MODEL_EMAIL_TEMPLATE); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 8ed7aaff22..49f8897884 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1942,4 +1942,4 @@ App::get('/v1/storage/:bucketId/usage') 'files' => $usage[$metrics[0]]['data'], 'storage' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_BUCKETS); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 612df0d439..9250f0c6b1 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -1408,4 +1408,4 @@ App::get('/v1/teams/:teamId/logs') 'total' => $audit->countLogsByResource($resource), 'logs' => $output, ]), Response::MODEL_LOG_LIST); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 9c3026793b..d2c840d368 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -2465,4 +2465,4 @@ App::get('/v1/users/usage') 'users' => $usage[$metrics[0]]['data'], 'sessions' => $usage[$metrics[1]]['data'], ]), Response::MODEL_USAGE_USERS); - }); \ No newline at end of file + }); diff --git a/app/controllers/general.php b/app/controllers/general.php index aedecf8a9c..8e282cb0e4 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1180,4 +1180,4 @@ foreach (Config::getParam('services', []) as $service) { // Check for any errors found while we were initialising the SDK Methods. if (!empty(Method::getErrors())) { throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors())); -} \ No newline at end of file +} diff --git a/src/Appwrite/GraphQL/Schema.php b/src/Appwrite/GraphQL/Schema.php index 5709310a6a..a0d93de45c 100644 --- a/src/Appwrite/GraphQL/Schema.php +++ b/src/Appwrite/GraphQL/Schema.php @@ -275,4 +275,4 @@ class Schema { self::$dirty[$projectId] = true; } -} \ No newline at end of file +} diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index deae9b5270..e5056d0abc 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -473,4 +473,4 @@ class Mapper throw new Exception('Unknown hash options implementation'); } -} \ No newline at end of file +} diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index bfc47cb69b..4d7fd5d695 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -324,4 +324,4 @@ class Specs extends Action } } } -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/AuthType.php b/src/Appwrite/SDK/AuthType.php index e2ae5ead4d..307b3cf35e 100644 --- a/src/Appwrite/SDK/AuthType.php +++ b/src/Appwrite/SDK/AuthType.php @@ -8,4 +8,4 @@ enum AuthType: string case KEY = APP_AUTH_TYPE_KEY; case SESSION = APP_AUTH_TYPE_SESSION; case ADMIN = APP_AUTH_TYPE_ADMIN; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/ContentType.php b/src/Appwrite/SDK/ContentType.php index 83a485bf17..174c889815 100644 --- a/src/Appwrite/SDK/ContentType.php +++ b/src/Appwrite/SDK/ContentType.php @@ -12,4 +12,4 @@ enum ContentType: string case HTML = 'text/html'; case TEXT = 'text/plain'; case ANY = '*/*'; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index fa4f6239c1..8064b75561 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -273,4 +273,4 @@ class Method { return self::$errors; } -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/MethodType.php b/src/Appwrite/SDK/MethodType.php index b4982c847a..2b1f786779 100644 --- a/src/Appwrite/SDK/MethodType.php +++ b/src/Appwrite/SDK/MethodType.php @@ -8,4 +8,4 @@ enum MethodType: string case LOCATION = 'location'; case GRAPHQL = 'graphql'; case UPLOAD = 'upload'; -} \ No newline at end of file +} diff --git a/src/Appwrite/SDK/Response.php b/src/Appwrite/SDK/Response.php index e2b3cab4d0..e87813024b 100644 --- a/src/Appwrite/SDK/Response.php +++ b/src/Appwrite/SDK/Response.php @@ -24,4 +24,4 @@ class Response { return $this->model; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 8aae96f92c..02568a8ccf 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -701,4 +701,4 @@ class OpenAPI3 extends Format return $output; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 4760da8b40..22aac47113 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -711,4 +711,4 @@ class Swagger2 extends Format return $output; } -} \ No newline at end of file +}