File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ private function createQueryOptions(): array
429
429
}
430
430
431
431
if (! empty ($ this ->options ['modifiers ' ])) {
432
- /** @var array|object */
432
+ /** @psalm- var array|object */
433
433
$ modifiers = $ this ->options ['modifiers ' ];
434
434
$ options ['modifiers ' ] = is_object ($ modifiers ) ? document_to_array ($ modifiers ) : $ modifiers ;
435
435
}
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ private function createCommandDocument(): array
293
293
}
294
294
295
295
if (isset ($ this ->options ['update ' ])) {
296
- /** @var array|object */
296
+ /** @psalm- var array|object */
297
297
$ update = $ this ->options ['update ' ];
298
298
$ cmd ['update ' ] = is_pipeline ($ update ) ? $ update : (object ) $ update ;
299
299
}
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ function document_to_array($document): array
115
115
/* Nested documents and arrays are intentionally left as BSON. We avoid
116
116
* iterator_to_array() since Document and PackedArray iteration returns
117
117
* all values as MongoDB\BSON\Value instances. */
118
- /** @var array */
118
+
119
+ /** @psalm-var array */
119
120
return $ document ->toPHP ([
120
121
'array ' => 'bson ' ,
121
122
'document ' => 'bson ' ,
@@ -249,7 +250,7 @@ function is_pipeline($pipeline): bool
249
250
/* Nested documents and arrays are intentionally left as BSON. We avoid
250
251
* iterator_to_array() since Document iteration returns all values as
251
252
* MongoDB\BSON\Value instances. */
252
- /** @var array */
253
+ /** @psalm- var array */
253
254
$ pipeline = $ pipeline ->toPHP ([
254
255
'array ' => 'bson ' ,
255
256
'document ' => 'bson ' ,
You can’t perform that action at this time.
0 commit comments