From db74da3e37901cfbdbb1aa4c98d07340a158a38a Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 23 Nov 2022 11:29:48 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Api/Controllers/SearchController.php | 3 ++- src/Commands/BuildCommand.php | 5 ++--- src/Jobs/SavingJob.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Api/Controllers/SearchController.php b/src/Api/Controllers/SearchController.php index d9d00a1..a59997f 100644 --- a/src/Api/Controllers/SearchController.php +++ b/src/Api/Controllers/SearchController.php @@ -48,7 +48,8 @@ class SearchController extends ListDiscussionsController ]; public function __construct(protected Client $elastic, protected UrlGenerator $uri) - {} + { + } protected function data(ServerRequestInterface $request, Document $document) { diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 4fcf31b..7534049 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -15,7 +15,6 @@ namespace Blomstra\Search\Commands; use Blomstra\Search\Jobs\Job; use Blomstra\Search\Jobs\SavingJob; use Blomstra\Search\Seeders\Seeder; -use Carbon\Carbon; use Elasticsearch\Client; use Flarum\Settings\SettingsRepositoryInterface; use Illuminate\Console\Command; @@ -142,12 +141,12 @@ class BuildCommand extends Command $response = (new Builder($client)) ->index($index) ->size(1000) - ->addQuery((new BoolQuery) + ->addQuery( + (new BoolQuery()) ->add((new RangeQuery('rawId')) ->gte($continueAt - 1000) ->lte($continueAt)) ->add(TermQuery::create('type', $seeder->type())) - ) ->search(); diff --git a/src/Jobs/SavingJob.php b/src/Jobs/SavingJob.php index 578cdb8..497c699 100644 --- a/src/Jobs/SavingJob.php +++ b/src/Jobs/SavingJob.php @@ -35,7 +35,7 @@ class SavingJob extends Job ]; }) ->flatten(1); -dump($body); + dump($body); $response = $client->bulk([ 'index' => $this->index, 'body' => $body->toArray(),