diff --git a/src/Appwrite/Databases/TransactionState.php b/src/Appwrite/Databases/TransactionState.php index f37366f72c..1f8e7f65c8 100644 --- a/src/Appwrite/Databases/TransactionState.php +++ b/src/Appwrite/Databases/TransactionState.php @@ -134,7 +134,9 @@ class TransactionState case 'upsert': $docId = $documentId ?? ($data['$id'] ?? null); - if (!$docId) { break; } + if (!$docId) { + break; + } $state[$collectionId][$docId] = [ 'action' => 'upsert', 'document' => new Document($data), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 2c8d26020d..a2156484a8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -144,7 +144,7 @@ class Upsert extends Action 'transactions', $transactionId, 'operations', - 1 + 1 ); }); diff --git a/src/Appwrite/Utopia/Database/Validator/Operation.php b/src/Appwrite/Utopia/Database/Validator/Operation.php index 911250c2bc..2e3dc8e9e0 100644 --- a/src/Appwrite/Utopia/Database/Validator/Operation.php +++ b/src/Appwrite/Utopia/Database/Validator/Operation.php @@ -151,7 +151,7 @@ class Operation extends Validator $this->description = "Key 'data' must be an array"; return false; } - } else if (\array_key_exists('data', $value)) { + } elseif (\array_key_exists('data', $value)) { // Data is optional but if provided, must be an array if (!\is_array($value['data'])) { $this->description = "Key 'data' must be an array";