@@ -346,7 +346,7 @@ public function toMql(): array
346
346
if ($ this ->aggregate ) {
347
347
$ function = $ this ->aggregate ['function ' ];
348
348
349
- foreach (( array ) $ this ->aggregate ['columns ' ] as $ column ) {
349
+ foreach ($ this ->aggregate ['columns ' ] as $ column ) {
350
350
// Add unwind if a subdocument array should be aggregated
351
351
// column: subarray.price => {$unwind: '$subarray'}
352
352
$ splitColumns = explode ('.*. ' , $ column );
@@ -355,7 +355,7 @@ public function toMql(): array
355
355
$ column = implode ('. ' , $ splitColumns );
356
356
}
357
357
358
- $ aggregations = blank ($ this ->aggregate ['columns ' ]) ? [] : ( array ) $ this ->aggregate ['columns ' ];
358
+ $ aggregations = blank ($ this ->aggregate ['columns ' ]) ? [] : $ this ->aggregate ['columns ' ];
359
359
360
360
if (in_array ('* ' , $ aggregations ) && $ function === 'count ' && empty ($ group ['_id ' ])) {
361
361
$ options = $ this ->inheritConnectionOptions ($ this ->options );
@@ -506,11 +506,11 @@ public function getFresh($columns = [], $returnLazy = false)
506
506
// here to either the passed columns, or the standard default of retrieving
507
507
// all of the columns on the table using the "wildcard" column character.
508
508
if ($ this ->columns === null ) {
509
- $ this ->columns = ( array ) $ columns ;
509
+ $ this ->columns = $ columns ;
510
510
}
511
511
512
512
// Drop all columns if * is present, MongoDB does not work this way.
513
- if (in_array ('* ' , ( array ) $ this ->columns )) {
513
+ if (in_array ('* ' , $ this ->columns )) {
514
514
$ this ->columns = [];
515
515
}
516
516
0 commit comments