From 412d858c4952927f97f79521373afba065532db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 18 Mar 2026 15:23:19 +0100 Subject: [PATCH] AI comments fixes --- src/Appwrite/Platform/Appwrite.php | 4 ++-- .../Modules/Project/Http/Project/Variables/Create.php | 4 ++-- .../Modules/Project/Http/Project/Variables/Delete.php | 2 +- .../Modules/Project/Http/Project/Variables/Update.php | 8 ++++---- .../Modules/Project/Http/Project/Variables/XList.php | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Appwrite/Platform/Appwrite.php b/src/Appwrite/Platform/Appwrite.php index 68dc40a894..06312d9cb2 100644 --- a/src/Appwrite/Platform/Appwrite.php +++ b/src/Appwrite/Platform/Appwrite.php @@ -9,13 +9,13 @@ use Appwrite\Platform\Modules\Core; use Appwrite\Platform\Modules\Databases; use Appwrite\Platform\Modules\Functions; use Appwrite\Platform\Modules\Health; +use Appwrite\Platform\Modules\Project; use Appwrite\Platform\Modules\Projects; use Appwrite\Platform\Modules\Proxy; use Appwrite\Platform\Modules\Sites; use Appwrite\Platform\Modules\Storage; use Appwrite\Platform\Modules\Teams; use Appwrite\Platform\Modules\Tokens; -use Appwrite\Platform\Modules\Variables; use Appwrite\Platform\Modules\VCS; use Appwrite\Platform\Modules\Webhooks; use Utopia\Platform\Platform; @@ -39,6 +39,6 @@ class Appwrite extends Platform $this->addModule(new Storage\Module()); $this->addModule(new VCS\Module()); $this->addModule(new Webhooks\Module()); - $this->addModule(new Variables\Module()); + $this->addModule(new Project\Module()); } } diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php index 9f7aeb3ece..a9209522e3 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Create.php @@ -44,7 +44,7 @@ class Create extends Base group: 'variables', name: 'createVariable', description: <<updateDocuments($collection, new Document([ - 'live', 'false' + 'live' => 'false' ])); } diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php index 2121703b5a..51b8f05a8c 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Delete.php @@ -77,7 +77,7 @@ class Delete extends Base foreach (['functions', 'sites'] as $collection) { $dbForProject->updateDocuments($collection, new Document([ - 'live', 'false' + 'live' => 'false' ])); } diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php index 802abc88fe..764acb2360 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/Update.php @@ -78,8 +78,8 @@ class Update extends Base throw new Exception(Exception::VARIABLE_NOT_FOUND); } - $isSeretVariable = $variable->getAttribute('secret', false) === true; - if ($isSeretVariable && $secret === false) { + $isSecretVariable = $variable->getAttribute('secret', false) === true; + if ($isSecretVariable && $secret === false) { throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET); } @@ -99,14 +99,14 @@ class Update extends Base } try { - $dbForProject->updateDocument('variables', $variable->getId(), $updates); + $variable = $dbForProject->updateDocument('variables', $variable->getId(), $updates); } catch (Duplicate $th) { throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); } foreach (['functions', 'sites'] as $collection) { $dbForProject->updateDocuments($collection, new Document([ - 'live', 'false' + 'live' => 'false' ])); } diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php index ac7ce4112c..cd11fe68c6 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/Variables/XList.php @@ -41,7 +41,7 @@ class XList extends Base group: 'variables', name: 'listVariables', description: <<