Skip to content

Commit 0e62cdb

Browse files
committed
Reformat and FIX
1 parent ab5b384 commit 0e62cdb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Jenssegers/Mongodb/Eloquent/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)