mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Format
This commit is contained in:
parent
44e7068a9a
commit
522a4d2a62
3 changed files with 5 additions and 3 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class Upsert extends Action
|
|||
'transactions',
|
||||
$transactionId,
|
||||
'operations',
|
||||
1
|
||||
1
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in a new issue