We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a18768d commit 89598baCopy full SHA for 89598ba
src/Engine/ElasticsearchEngine.php
@@ -41,9 +41,7 @@ class ElasticsearchEngine extends Engine
41
*/
42
public function __construct(protected Client $elastic, ?string $index = null)
43
{
44
- if ($index) {
45
- $this->index = $this->initIndex($elastic, $index);
46
- }
+ $this->index = $this->initIndex($elastic, $index);
47
}
48
49
/**
@@ -193,7 +191,7 @@ public function flush(Model $model): void
193
191
->unsearchable();
194
192
195
196
- protected function initIndex(Client $client, string $index): ?string
+ protected function initIndex(Client $client, ?string $index): ?string
197
198
if (! static::$version) {
199
try {
0 commit comments