Skip to content

Commit 7b14654

Browse files
limenetactions-user
authored andcommitted
Fix styling
1 parent ae65913 commit 7b14654

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

src/Commands/IndexCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function handle()
4848
{
4949
foreach ($this->indexRepository->all() as $indexConfig) {
5050
if (
51-
!empty($this->argument('index'))
52-
&& !in_array($indexConfig->getName(), $this->argument('index'), true)
51+
! empty($this->argument('index'))
52+
&& ! in_array($indexConfig->getName(), $this->argument('index'), true)
5353
) {
5454
continue;
5555
}

src/Index/AbstractIndex.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function searchForElements(Query\AbstractQuery $query, int $size = 10, in
6666
->search(
6767
(new Query($query))
6868
->setSize($size)
69-
->setFrom($from))
69+
->setFrom($from)
70+
)
7071
);
7172
}
7273

@@ -110,7 +111,7 @@ final public function hasBlueGreenIndices(): bool
110111

111112
final public function getBlueGreenActiveSuffix(): string
112113
{
113-
if (!$this->hasBlueGreenIndices()) {
114+
if (! $this->hasBlueGreenIndices()) {
114115
throw new BlueGreenIndicesIncorrectlySetupException();
115116
}
116117

@@ -125,7 +126,7 @@ final public function getBlueGreenActiveSuffix(): string
125126

126127
$suffix = substr((string) array_keys($aliases)[0], strlen($this->getName()));
127128

128-
if (!in_array($suffix, self::INDEX_SUFFIXES, true)) {
129+
if (! in_array($suffix, self::INDEX_SUFFIXES, true)) {
129130
throw new BlueGreenIndicesIncorrectlySetupException();
130131
}
131132

src/Jobs/AbstractIndexJob.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
abstract class AbstractIndexJob implements ShouldQueue, ShouldBeUnique
1717
{
18-
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
18+
use Dispatchable;
19+
use InteractsWithQueue;
20+
use Queueable;
21+
use SerializesModels;
1922

2023
protected IndexInterface $indexConfig;
2124

src/Jobs/PopulateBatchIndex.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
class PopulateBatchIndex implements ShouldQueue
1717
{
18-
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Batchable;
18+
use Dispatchable;
19+
use InteractsWithQueue;
20+
use Queueable;
21+
use SerializesModels;
22+
use Batchable;
1923

2024
/**
2125
* Create a new job instance.
@@ -41,7 +45,7 @@ public function handle(): void
4145
/** @var ElasticsearchableInterface[] $records */
4246
$records = $this->indexDocument::offset($this->offset)->limit($this->limit)->get();
4347
foreach ($records as $record) {
44-
if (!$record->shouldIndex()) {
48+
if (! $record->shouldIndex()) {
4549
continue;
4650
}
4751

src/Jobs/SetupIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function handle(ElasticaClient $elastica): void
3333
$aliasIndex->delete();
3434
}
3535

36-
if (!$aliasIndex->exists()) {
36+
if (! $aliasIndex->exists()) {
3737
$aliasIndex->create($this->indexConfig->getCreateArguments());
3838
}
3939
}

src/Model/ElasticsearchableTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function toElasticaDocument(): Document
2525
$this->getElasticsearchId(),
2626
array_merge(
2727
$this->toElasticsearch(),
28-
[
28+
[
2929
IndexInterface::DOCUMENT_MODEL_CLASS => $this::class,
3030
IndexInterface::DOCUMENT_MODEL_ID => $this->id,
3131
]

0 commit comments

Comments
 (0)