@@ -13,7 +13,7 @@ class Builder extends EloquentBuilder {
1313 */
1414 protected $ passthru = array (
1515 'toSql ' , 'lists ' , 'insert ' , 'insertGetId ' , 'pluck ' ,
16- 'count ' , 'min ' , 'max ' , 'avg ' , 'sum ' , 'exists ' , 'push ' , 'pull '
16+ 'count ' , 'min ' , 'max ' , 'avg ' , 'sum ' , 'exists ' , 'push ' , 'pull ' ,
1717 );
1818
1919 /**
@@ -174,7 +174,7 @@ protected function addHasWhere(EloquentBuilder $hasQuery, Relation $relation, $o
174174 $ relationCount = array_count_values ($ query ->lists ($ relation ->getHasCompareKey ()));
175175
176176 // Remove unwanted related objects based on the operator and count.
177- $ relationCount = array_filter ($ relationCount , function ($ counted ) use ($ count , $ operator )
177+ $ relationCount = array_filter ($ relationCount , function ($ counted ) use ($ count , $ operator )
178178 {
179179 // If we are comparing to 0, we always need all results.
180180 if ($ count == 0 ) return true ;
@@ -213,29 +213,29 @@ protected function addHasWhere(EloquentBuilder $hasQuery, Relation $relation, $o
213213 * @return mixed
214214 */
215215 public function raw ($ expression = null )
216- {
217- // Get raw results from the query builder.
218- $ results = $ this ->query ->raw ($ expression );
216+ {
217+ // Get raw results from the query builder.
218+ $ results = $ this ->query ->raw ($ expression );
219219
220- // Convert MongoCursor results to a collection of models.
221- if ($ results instanceof MongoCursor)
222- {
223- $ results = iterator_to_array ($ results , false );
220+ // Convert MongoCursor results to a collection of models.
221+ if ($ results instanceof MongoCursor)
222+ {
223+ $ results = iterator_to_array ($ results , false );
224224
225- return $ this ->model ->hydrate ($ results );
226- }
225+ return $ this ->model ->hydrate ($ results );
226+ }
227227
228- // The result is a single object.
229- else if (is_array ($ results ) and array_key_exists ('_id ' , $ results ))
230- {
231- $ model = $ this ->model ->newFromBuilder ($ results );
228+ // The result is a single object.
229+ elseif (is_array ($ results ) and array_key_exists ('_id ' , $ results ))
230+ {
231+ $ model = $ this ->model ->newFromBuilder ($ results );
232232
233- $ model ->setConnection ($ this ->model ->getConnection ());
233+ $ model ->setConnection ($ this ->model ->getConnection ());
234234
235- return $ model ;
236- }
235+ return $ model ;
236+ }
237237
238- return $ results ;
239- }
238+ return $ results ;
239+ }
240240
241241}
0 commit comments