Skip to content

Commit 1ed025e

Browse files
limenetgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 24f07c4 commit 1ed025e

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

src/Index/AbstractIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getModelInstance(Document $document): Model
9494
try {
9595
$modelClass = $document->get(self::DOCUMENT_MODEL_CLASS);
9696
$modelId = $document->get(self::DOCUMENT_MODEL_ID);
97-
} catch(InvalidException) {
97+
} catch (InvalidException) {
9898
throw new RuntimeException();
9999
}
100100

src/LaravelElasticaBridgeServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public function packageRegistered(): void
3636
$this->app->tag(config('elastica-bridge.indices'), 'elasticaBridgeIndices');
3737

3838
$this->app->when(IndexRepository::class)
39-
->needs('$indices')
40-
->giveTagged('elasticaBridgeIndices');
39+
->needs('$indices')
40+
->giveTagged('elasticaBridgeIndices');
4141

4242
$this->app['events']->subscribe(EventHandler::class);
4343
}

tests/Unit/ModelTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function test_convert_to_elastica_document_customized(): void
5757
public function test_convert_to_elastica_document_default(): void
5858
{
5959
Product::all()
60-
->filter(fn (Product $product): bool => $product->shouldIndex($this->productIndex))
60+
->filter(fn (Product $product): bool => $product->shouldIndex($this->productIndex))
6161
->each(function (Product $product): void {
6262
$document = $product->toElasticaDocument($this->productIndex);
6363
$this->assertInstanceOf(Document::class, $document);
@@ -80,19 +80,19 @@ public function test_convert_to_elastica_documentuuid(): void
8080
{
8181
Invoice::all()
8282
->filter(fn (Invoice $invoice): bool => $invoice->shouldIndex($this->invoiceIndex))
83-
->each(function (Invoice $invoice): void {
84-
$document = $invoice->toElasticaDocument($this->invoiceIndex);
85-
$this->assertInstanceOf(Document::class, $document);
86-
87-
$this->assertStringContainsString('-'.$invoice->getKey(), $document->getId());
88-
$this->assertStringContainsString(
89-
str($invoice::class)->classBasename()->lower()->append('-')->toString(),
90-
$document->getId()
91-
);
92-
$this->assertMatchesRegularExpression('/[\w\d_-]/', $document->getId());
93-
94-
$this->assertSame($invoice->uuid, $document->get(IndexInterface::DOCUMENT_MODEL_ID));
95-
$this->assertSame($invoice::class, $document->get(IndexInterface::DOCUMENT_MODEL_CLASS));
96-
});
83+
->each(function (Invoice $invoice): void {
84+
$document = $invoice->toElasticaDocument($this->invoiceIndex);
85+
$this->assertInstanceOf(Document::class, $document);
86+
87+
$this->assertStringContainsString('-'.$invoice->getKey(), $document->getId());
88+
$this->assertStringContainsString(
89+
str($invoice::class)->classBasename()->lower()->append('-')->toString(),
90+
$document->getId()
91+
);
92+
$this->assertMatchesRegularExpression('/[\w\d_-]/', $document->getId());
93+
94+
$this->assertSame($invoice->uuid, $document->get(IndexInterface::DOCUMENT_MODEL_ID));
95+
$this->assertSame($invoice::class, $document->get(IndexInterface::DOCUMENT_MODEL_CLASS));
96+
});
9797
}
9898
}

0 commit comments

Comments
 (0)