Skip to content

Commit 7d4fca6

Browse files
limenetgithub-actions[bot]
authored andcommitted
Fix styling
1 parent c984780 commit 7d4fca6

File tree

11 files changed

+16
-24
lines changed

11 files changed

+16
-24
lines changed

src/Client/ElasticaClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct()
2222
]);
2323

2424
if (config('elastica-bridge.logging.sentry_breadcrumbs') === true && class_exists('\Sentry\Breadcrumb')) {
25-
$client->setLogger(new SentryBreadcrumbLogger());
25+
$client->setLogger(new SentryBreadcrumbLogger);
2626
}
2727

2828
$this->client = $client;

src/Events/EventHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ class EventHandler
1212
public function __construct(
1313
private readonly ElasticaClient $elasticaClient,
1414
private readonly ModelEventListener $modelEventListener
15-
) {
16-
}
15+
) {}
1716

1817
public function subscribe(Dispatcher $events): void
1918
{

src/Index/AbstractIndex.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getModelInstance(Document $document): Model
9595
$modelClass = $document->get(self::DOCUMENT_MODEL_CLASS);
9696
$modelId = $document->get(self::DOCUMENT_MODEL_ID);
9797
} catch (InvalidException) {
98-
throw new RuntimeException();
98+
throw new RuntimeException;
9999
}
100100

101101
return $modelClass::findOrFail($modelId);
@@ -125,7 +125,7 @@ final public function hasBlueGreenIndices(): bool
125125
final public function getBlueGreenActiveSuffix(): string
126126
{
127127
if (! $this->hasBlueGreenIndices()) {
128-
throw new BlueGreenIndicesIncorrectlySetupException();
128+
throw new BlueGreenIndicesIncorrectlySetupException;
129129
}
130130

131131
$aliases = array_filter(
@@ -134,13 +134,13 @@ final public function getBlueGreenActiveSuffix(): string
134134
);
135135

136136
if (count($aliases) !== 1) {
137-
throw new BlueGreenIndicesIncorrectlySetupException();
137+
throw new BlueGreenIndicesIncorrectlySetupException;
138138
}
139139

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

142142
if (! in_array($suffix, self::INDEX_SUFFIXES, true)) {
143-
throw new BlueGreenIndicesIncorrectlySetupException();
143+
throw new BlueGreenIndicesIncorrectlySetupException;
144144
}
145145

146146
return $suffix;
@@ -158,7 +158,7 @@ final public function getBlueGreenInactiveSuffix(): string
158158
return self::INDEX_SUFFIX_BLUE;
159159
}
160160

161-
throw new BlueGreenIndicesIncorrectlySetupException();
161+
throw new BlueGreenIndicesIncorrectlySetupException;
162162
}
163163

164164
final public function getBlueGreenActiveElasticaIndex(): Index

src/Jobs/ActivateIndex.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class ActivateIndex extends AbstractIndexJob
1010
{
1111
public function __construct(
1212
protected IndexInterface $indexConfig
13-
) {
14-
}
13+
) {}
1514

1615
public function handle(): void
1716
{

src/Jobs/PopulateBatchIndex.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public function __construct(
2929
private readonly string $indexDocument,
3030
private readonly int $limit,
3131
private readonly int $offset
32-
) {
33-
}
32+
) {}
3433

3534
public function handle(): void
3635
{

src/Jobs/PopulateIndex.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class PopulateIndex extends AbstractIndexJob
1313

1414
public function __construct(
1515
protected IndexInterface $indexConfig
16-
) {
17-
}
16+
) {}
1817

1918
public function handle(): void
2019
{

src/Jobs/SetupIndex.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class SetupIndex extends AbstractIndexJob
1919
public function __construct(
2020
protected IndexInterface $indexConfig,
2121
private readonly bool $deleteExisting
22-
) {
23-
}
22+
) {}
2423

2524
public function handle(ElasticaClient $elastica): void
2625
{

src/Services/ModelEventListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class ModelEventListener
3232

3333
public function __construct(
3434
private readonly IndexRepository $indexRepository
35-
) {
36-
}
35+
) {}
3736

3837
public function handle(string $event, Model $model): void
3938
{

tests/Feature/QueryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function test_size_and_from(): void
3535
{
3636
$this->index($this->productIndex);
3737

38-
$elements1 = $this->productIndex->searchForElements(new BoolQuery(), 5, 0);
38+
$elements1 = $this->productIndex->searchForElements(new BoolQuery, 5, 0);
3939
$this->assertCount(5, $elements1);
4040

41-
$elements2 = $this->productIndex->searchForElements(new BoolQuery(), 5, 5);
41+
$elements2 = $this->productIndex->searchForElements(new BoolQuery, 5, 5);
4242
$this->assertCount(5, $elements2);
4343
$this->assertEmpty(collect($elements1)->map->id->intersect(collect($elements2)->map->id)->toArray());
4444
}

tests/Unit/IndexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ public function test_blue_green(): void
134134

135135
public function test_results_base_case(): void
136136
{
137-
$this->assertSame([], $this->customerIndex->documentResultToElements(new ResultSet(new Response('{}'), new Query(), [])));
137+
$this->assertSame([], $this->customerIndex->documentResultToElements(new ResultSet(new Response('{}'), new Query, [])));
138138
}
139139
}

0 commit comments

Comments
 (0)