@@ -346,7 +346,7 @@ public function toMql(): array
346346 if ($ this ->aggregate ) {
347347 $ function = $ this ->aggregate ['function ' ];
348348
349- foreach (( array ) $ this ->aggregate ['columns ' ] as $ column ) {
349+ foreach ($ this ->aggregate ['columns ' ] as $ column ) {
350350 // Add unwind if a subdocument array should be aggregated
351351 // column: subarray.price => {$unwind: '$subarray'}
352352 $ splitColumns = explode ('.*. ' , $ column );
@@ -355,7 +355,7 @@ public function toMql(): array
355355 $ column = implode ('. ' , $ splitColumns );
356356 }
357357
358- $ aggregations = blank ($ this ->aggregate ['columns ' ]) ? [] : ( array ) $ this ->aggregate ['columns ' ];
358+ $ aggregations = blank ($ this ->aggregate ['columns ' ]) ? [] : $ this ->aggregate ['columns ' ];
359359
360360 if (in_array ('* ' , $ aggregations ) && $ function === 'count ' && empty ($ group ['_id ' ])) {
361361 $ options = $ this ->inheritConnectionOptions ($ this ->options );
@@ -506,11 +506,11 @@ public function getFresh($columns = [], $returnLazy = false)
506506 // here to either the passed columns, or the standard default of retrieving
507507 // all of the columns on the table using the "wildcard" column character.
508508 if ($ this ->columns === null ) {
509- $ this ->columns = ( array ) $ columns ;
509+ $ this ->columns = $ columns ;
510510 }
511511
512512 // 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 )) {
514514 $ this ->columns = [];
515515 }
516516
0 commit comments