Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot 2022-11-23 11:29:48 +00:00
parent a02d35394b
commit db74da3e37
No known key found for this signature in database
GPG Key ID: EEAFB12C3E6BC249
3 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,8 @@ class SearchController extends ListDiscussionsController
]; ];
public function __construct(protected Client $elastic, protected UrlGenerator $uri) public function __construct(protected Client $elastic, protected UrlGenerator $uri)
{} {
}
protected function data(ServerRequestInterface $request, Document $document) protected function data(ServerRequestInterface $request, Document $document)
{ {

View File

@ -15,7 +15,6 @@ namespace Blomstra\Search\Commands;
use Blomstra\Search\Jobs\Job; use Blomstra\Search\Jobs\Job;
use Blomstra\Search\Jobs\SavingJob; use Blomstra\Search\Jobs\SavingJob;
use Blomstra\Search\Seeders\Seeder; use Blomstra\Search\Seeders\Seeder;
use Carbon\Carbon;
use Elasticsearch\Client; use Elasticsearch\Client;
use Flarum\Settings\SettingsRepositoryInterface; use Flarum\Settings\SettingsRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@ -142,12 +141,12 @@ class BuildCommand extends Command
$response = (new Builder($client)) $response = (new Builder($client))
->index($index) ->index($index)
->size(1000) ->size(1000)
->addQuery((new BoolQuery) ->addQuery(
(new BoolQuery())
->add((new RangeQuery('rawId')) ->add((new RangeQuery('rawId'))
->gte($continueAt - 1000) ->gte($continueAt - 1000)
->lte($continueAt)) ->lte($continueAt))
->add(TermQuery::create('type', $seeder->type())) ->add(TermQuery::create('type', $seeder->type()))
) )
->search(); ->search();

View File

@ -35,7 +35,7 @@ class SavingJob extends Job
]; ];
}) })
->flatten(1); ->flatten(1);
dump($body); dump($body);
$response = $client->bulk([ $response = $client->bulk([
'index' => $this->index, 'index' => $this->index,
'body' => $body->toArray(), 'body' => $body->toArray(),