Skip to content

Commit

Permalink
feat(): update package
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Szymański committed Feb 26, 2020
1 parent 3a0c67d commit c57d5c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Builders/FilterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public function whereCustom(array $filter)
* @param callable|null $default
* @return $this
*/
public function when($value, callable $callback, callable $default = null)
public function when($value, $callback, $default = null)
{
if ($value) {
return $callback($this);
Expand Down
5 changes: 3 additions & 2 deletions src/ElasticEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Artisan;
use Laravel\Scout\Builder;
use Laravel\Scout\Engines\Engine;
Expand Down Expand Up @@ -265,7 +266,7 @@ public function searchRaw(Model $model, $query)
*/
public function mapIds($results)
{
return array_pluck($results['hits']['hits'], '_id');
return Arr::pluck($results['hits']['hits'], '_id');
}

/**
Expand All @@ -280,7 +281,7 @@ public function map(Builder $builder, $results, $model)
$primaryKey = $model->getKeyName();
$keyType = $model->getKeyType();

$columns = array_get($results, '_payload.body._source');
$columns = Arr::get($results, '_payload.body._source');

if (is_null($columns)) {
$columns = ['*'];
Expand Down

0 comments on commit c57d5c7

Please sign in to comment.