File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -226,12 +226,12 @@ public function raw($expression = null)
226226 // Convert Mongo BSONDocument to a single object.
227227 elseif ($ results instanceof BSONDocument) {
228228 $ results = $ results ->getArrayCopy ();
229- return $ this ->model ->newFromBuilder ((array )$ results );
229+ return $ this ->model ->newFromBuilder ((array ) $ results );
230230 }
231231
232232 // The result is a single object.
233233 elseif (is_array ($ results ) and array_key_exists ('_id ' , $ results )) {
234- return $ this ->model ->newFromBuilder ((array )$ results );
234+ return $ this ->model ->newFromBuilder ((array ) $ results );
235235 }
236236
237237 return $ results ;
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ public function getFresh($columns = [])
267267 $ results = iterator_to_array ($ this ->collection ->aggregate ($ pipeline , $ options ));
268268
269269 // Return results
270- return SHOULD_RETURN_COLLECTION ? new Collection ($ results ) : $ results ;
270+ return $ this -> use_collection ? new Collection ($ results ) : $ results ;
271271 }
272272
273273 // Distinct query
@@ -282,7 +282,7 @@ public function getFresh($columns = [])
282282 $ result = $ this ->collection ->distinct ($ column );
283283 }
284284
285- return SHOULD_RETURN_COLLECTION ? new Collection ($ result ) : $ result ;
285+ return $ this -> use_collection ? new Collection ($ result ) : $ result ;
286286 }
287287
288288 // Normal query
@@ -326,7 +326,7 @@ public function getFresh($columns = [])
326326
327327 // Return results as an array with numeric keys
328328 $ results = iterator_to_array ($ cursor , false );
329- return SHOULD_RETURN_COLLECTION ? new Collection ($ results ) : $ results ;
329+ return $ this -> use_collection ? new Collection ($ results ) : $ results ;
330330 }
331331 }
332332
@@ -1038,4 +1038,4 @@ public function __call($method, $parameters)
10381038
10391039 return parent ::__call ($ method , $ parameters );
10401040 }
1041- }
1041+ }
You can’t perform that action at this time.
0 commit comments