18
18
use MongoDB \Laravel \Helpers \QueriesRelationships ;
19
19
use MongoDB \Laravel \Query \AggregationBuilder ;
20
20
use MongoDB \Model \BSONDocument ;
21
+ use Override ;
21
22
22
23
use function array_key_exists ;
23
24
use function array_map ;
@@ -127,7 +128,12 @@ public function vectorSearch(
127
128
return $ this ->model ->hydrate ($ results ->all ());
128
129
}
129
130
130
- /** @inheritdoc */
131
+ /**
132
+ * @param array $options
133
+ *
134
+ * @inheritdoc
135
+ */
136
+ #[Override]
131
137
public function update (array $ values , array $ options = [])
132
138
{
133
139
// Intercept operations on embedded models and delegate logic
@@ -270,6 +276,8 @@ public function raw($value = null)
270
276
return $ results ;
271
277
}
272
278
279
+ /** @inheritdoc */
280
+ #[Override]
273
281
public function firstOrCreate (array $ attributes = [], array $ values = [])
274
282
{
275
283
$ instance = (clone $ this )->where ($ attributes )->first ();
@@ -285,6 +293,8 @@ public function firstOrCreate(array $attributes = [], array $values = [])
285
293
return $ this ->createOrFirst ($ attributes , $ values );
286
294
}
287
295
296
+ /** @inheritdoc */
297
+ #[Override]
288
298
public function createOrFirst (array $ attributes = [], array $ values = [])
289
299
{
290
300
// The duplicate key error would abort the transaction. Using the regular firstOrCreate in that case.
@@ -309,8 +319,9 @@ public function createOrFirst(array $attributes = [], array $values = [])
309
319
* will be reverted
310
320
* Issue in laravel/frawework https://github.com/laravel/framework/issues/27791.
311
321
*
312
- * @return array
322
+ * @inheritdoc
313
323
*/
324
+ #[Override]
314
325
protected function addUpdatedAtColumn (array $ values )
315
326
{
316
327
if (! $ this ->model ->usesTimestamps () || $ this ->model ->getUpdatedAtColumn () === null ) {
@@ -332,6 +343,7 @@ public function getConnection(): Connection
332
343
}
333
344
334
345
/** @inheritdoc */
346
+ #[Override]
335
347
protected function ensureOrderForCursorPagination ($ shouldReverse = false )
336
348
{
337
349
if (empty ($ this ->query ->orders )) {
0 commit comments