You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -66,17 +67,19 @@ final class ScoutEngine extends Engine
66
67
publicfunction__construct(
67
68
privateDatabase$database,
68
69
privatebool$softDelete,
69
-
privatestring$prefix,
70
70
) {
71
71
}
72
72
73
73
/**
74
74
* Update the given model in the index.
75
75
*
76
+
* @see Engine::update()
77
+
*
76
78
* @param EloquentCollection $models
77
79
*
78
80
* @throws MongoDBRuntimeException
79
81
*/
82
+
#[Override]
80
83
publicfunctionupdate($models)
81
84
{
82
85
if ($models->isEmpty()) {
@@ -121,8 +124,11 @@ public function update($models)
121
124
/**
122
125
* Remove the given model from the index.
123
126
*
127
+
* @see Engine::delete()
128
+
*
124
129
* @param EloquentCollection $models
125
130
*/
131
+
#[Override]
126
132
publicfunctiondelete($models): void
127
133
{
128
134
assert($modelsinstanceof Collection, newTypeError(sprintf('Argument #1 ($models) must be of type %s, %s given', Collection::class, get_debug_type($models))));
@@ -139,8 +145,11 @@ public function delete($models): void
139
145
/**
140
146
* Perform the given search on the engine.
141
147
*
148
+
* @see Engine::search()
149
+
*
142
150
* @return mixed
143
151
*/
152
+
#[Override]
144
153
publicfunctionsearch(Builder$builder)
145
154
{
146
155
return$this->performSearch($builder);
@@ -149,11 +158,14 @@ public function search(Builder $builder)
assert($resultsinstanceof Cursor || is_array($results), newTypeError(sprintf('Argument #2 ($results) must be of type %s|array, %s given', Cursor::class, get_debug_type($results))));
@@ -388,9 +415,12 @@ public function lazyMap(Builder $builder, $results, $model): LazyCollection
388
415
* Accepted options:
389
416
* - wait: bool, default true. Wait for the index to be created.
0 commit comments