Skip to content

Commit fbdb41a

Browse files
committed
style: fix (updated) code style
1 parent 2fb7b23 commit fbdb41a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/Client.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ public function __construct(private readonly ElasticsearchClient $elasticSearchC
1616
}
1717

1818
/**
19-
* @param array<string,mixed> $query
19+
* @param array<string,mixed> $query
2020
*/
2121
public function search(array $query): Elasticsearch
2222
{
2323
return $this->elasticSearchClient->search($query);
2424
}
2525

2626
/**
27-
* @param Elasticsearch $searchResultsResponse
28-
*
2927
* @return Collection<array-key, SearchResult|SearchResultInterface>
3028
*/
3129
public function createCollectionResponse(Elasticsearch $searchResultsResponse): Collection
@@ -34,7 +32,7 @@ public function createCollectionResponse(Elasticsearch $searchResultsResponse):
3432

3533
$hits = new Collection($searchResults['hits']['hits']);
3634

37-
if (!app()->bound(SearchResultInterface::class)) {
35+
if (! app()->bound(SearchResultInterface::class)) {
3836
/* @phpstan-ignore-next-line */
3937
return $hits->map(
4038
static fn (array $document): SearchResult => SearchResult::fromElasticsearchResult($document)

src/Concerns/SyncsWithIndex.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait SyncsWithIndex
1515
{
1616
protected static function bootSyncsWithIndex(): void
1717
{
18-
if (!config('elasticsearch.enabled')) {
18+
if (! config('elasticsearch.enabled')) {
1919
return;
2020
}
2121

src/Document.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
class Document implements DocumentInterface
1111
{
1212
protected string $id;
13+
1314
protected string $type;
15+
1416
protected Carbon $date;
1517

1618
public function setId(string $id): static

src/SearchResult.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
class SearchResult implements Arrayable, SearchResultInterface
1313
{
1414
protected string $id;
15+
1516
protected string $type;
17+
1618
protected Carbon $date;
1719

1820
public function getId(): string
@@ -52,7 +54,7 @@ public function getDate(): Carbon
5254
}
5355

5456
/**
55-
* @param array<string, mixed> $values
57+
* @param array<string, mixed> $values
5658
*/
5759
public static function fromElasticsearchResult(array $values): self
5860
{

0 commit comments

Comments
 (0)