@@ -63,19 +63,19 @@ public function listCollections(string $search = null, int $limit = null, int $o
63
63
*/
64
64
public function createCollection (string $ name , array $ read , array $ write , array $ rules ): array
65
65
{
66
- if (empty ($ name )) {
66
+ if (! isset ($ name )) {
67
67
throw new AppwriteException ('Missing required parameter: "name" ' );
68
68
}
69
69
70
- if (empty ($ read )) {
70
+ if (! isset ($ read )) {
71
71
throw new AppwriteException ('Missing required parameter: "read" ' );
72
72
}
73
73
74
- if (empty ($ write )) {
74
+ if (! isset ($ write )) {
75
75
throw new AppwriteException ('Missing required parameter: "write" ' );
76
76
}
77
77
78
- if (empty ($ rules )) {
78
+ if (! isset ($ rules )) {
79
79
throw new AppwriteException ('Missing required parameter: "rules" ' );
80
80
}
81
81
@@ -115,7 +115,7 @@ public function createCollection(string $name, array $read, array $write, array
115
115
*/
116
116
public function getCollection (string $ collectionId ): array
117
117
{
118
- if (empty ($ collectionId )) {
118
+ if (! isset ($ collectionId )) {
119
119
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
120
120
}
121
121
@@ -142,11 +142,11 @@ public function getCollection(string $collectionId): array
142
142
*/
143
143
public function updateCollection (string $ collectionId , string $ name , array $ read = null , array $ write = null , array $ rules = null ): array
144
144
{
145
- if (empty ($ collectionId )) {
145
+ if (! isset ($ collectionId )) {
146
146
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
147
147
}
148
148
149
- if (empty ($ name )) {
149
+ if (! isset ($ name )) {
150
150
throw new AppwriteException ('Missing required parameter: "name" ' );
151
151
}
152
152
@@ -186,7 +186,7 @@ public function updateCollection(string $collectionId, string $name, array $read
186
186
*/
187
187
public function deleteCollection (string $ collectionId ): array
188
188
{
189
- if (empty ($ collectionId )) {
189
+ if (! isset ($ collectionId )) {
190
190
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
191
191
}
192
192
@@ -219,7 +219,7 @@ public function deleteCollection(string $collectionId): array
219
219
*/
220
220
public function listDocuments (string $ collectionId , array $ filters = null , int $ limit = null , int $ offset = null , string $ orderField = null , string $ orderType = null , string $ orderCast = null , string $ search = null ): array
221
221
{
222
- if (empty ($ collectionId )) {
222
+ if (! isset ($ collectionId )) {
223
223
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
224
224
}
225
225
@@ -279,11 +279,11 @@ public function listDocuments(string $collectionId, array $filters = null, int $
279
279
*/
280
280
public function createDocument (string $ collectionId , array $ data , array $ read = null , array $ write = null , string $ parentDocument = null , string $ parentProperty = null , string $ parentPropertyType = null ): array
281
281
{
282
- if (empty ($ collectionId )) {
282
+ if (! isset ($ collectionId )) {
283
283
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
284
284
}
285
285
286
- if (empty ($ data )) {
286
+ if (! isset ($ data )) {
287
287
throw new AppwriteException ('Missing required parameter: "data" ' );
288
288
}
289
289
@@ -332,11 +332,11 @@ public function createDocument(string $collectionId, array $data, array $read =
332
332
*/
333
333
public function getDocument (string $ collectionId , string $ documentId ): array
334
334
{
335
- if (empty ($ collectionId )) {
335
+ if (! isset ($ collectionId )) {
336
336
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
337
337
}
338
338
339
- if (empty ($ documentId )) {
339
+ if (! isset ($ documentId )) {
340
340
throw new AppwriteException ('Missing required parameter: "documentId" ' );
341
341
}
342
342
@@ -364,15 +364,15 @@ public function getDocument(string $collectionId, string $documentId): array
364
364
*/
365
365
public function updateDocument (string $ collectionId , string $ documentId , array $ data , array $ read = null , array $ write = null ): array
366
366
{
367
- if (empty ($ collectionId )) {
367
+ if (! isset ($ collectionId )) {
368
368
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
369
369
}
370
370
371
- if (empty ($ documentId )) {
371
+ if (! isset ($ documentId )) {
372
372
throw new AppwriteException ('Missing required parameter: "documentId" ' );
373
373
}
374
374
375
- if (empty ($ data )) {
375
+ if (! isset ($ data )) {
376
376
throw new AppwriteException ('Missing required parameter: "data" ' );
377
377
}
378
378
@@ -410,11 +410,11 @@ public function updateDocument(string $collectionId, string $documentId, array $
410
410
*/
411
411
public function deleteDocument (string $ collectionId , string $ documentId ): array
412
412
{
413
- if (empty ($ collectionId )) {
413
+ if (! isset ($ collectionId )) {
414
414
throw new AppwriteException ('Missing required parameter: "collectionId" ' );
415
415
}
416
416
417
- if (empty ($ documentId )) {
417
+ if (! isset ($ documentId )) {
418
418
throw new AppwriteException ('Missing required parameter: "documentId" ' );
419
419
}
420
420
0 commit comments