Commit cb42e3b9 authored by pi0's avatar pi0

Style CI

parent 9133ba46
...@@ -168,7 +168,7 @@ class Builder extends EloquentBuilder ...@@ -168,7 +168,7 @@ class Builder extends EloquentBuilder
// Get the number of related objects for each possible parent. // Get the number of related objects for each possible parent.
$relationCount = array_count_values(array_map(function ($id) { $relationCount = array_count_values(array_map(function ($id) {
return (string)$id; // Convert Back ObjectIds to Strings return (string) $id; // Convert Back ObjectIds to Strings
}, $query->pluck($relation->getHasCompareKey()))); }, $query->pluck($relation->getHasCompareKey())));
// Remove unwanted related objects based on the operator and count. // Remove unwanted related objects based on the operator and count.
...@@ -224,10 +224,10 @@ class Builder extends EloquentBuilder ...@@ -224,10 +224,10 @@ class Builder extends EloquentBuilder
} // Convert Mongo BSONDocument to a single object. } // Convert Mongo BSONDocument to a single object.
elseif ($results instanceof BSONDocument) { elseif ($results instanceof BSONDocument) {
$results = $results->getArrayCopy(); $results = $results->getArrayCopy();
return $this->model->newFromBuilder((array)$results); return $this->model->newFromBuilder((array) $results);
} // The result is a single object. } // The result is a single object.
elseif (is_array($results) and array_key_exists('_id', $results)) { elseif (is_array($results) and array_key_exists('_id', $results)) {
return $this->model->newFromBuilder((array)$results); return $this->model->newFromBuilder((array) $results);
} }
return $results; return $results;
......
...@@ -4,7 +4,6 @@ use Closure; ...@@ -4,7 +4,6 @@ use Closure;
use DateTime; use DateTime;
use Illuminate\Database\Query\Builder as BaseBuilder; use Illuminate\Database\Query\Builder as BaseBuilder;
use Illuminate\Database\Query\Expression; use Illuminate\Database\Query\Expression;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Jenssegers\Mongodb\Connection; use Jenssegers\Mongodb\Connection;
use MongoDB\BSON\ObjectID; use MongoDB\BSON\ObjectID;
...@@ -569,7 +568,7 @@ class Builder extends BaseBuilder ...@@ -569,7 +568,7 @@ class Builder extends BaseBuilder
{ {
$results = $this->get(is_null($key) ? [$column] : [$column, $key]); $results = $this->get(is_null($key) ? [$column] : [$column, $key]);
return $results->pluck($column,$key); return $results->pluck($column, $key);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment