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,7 @@ public function raw($value = null)
270
276
return $ results ;
271
277
}
272
278
279
+ #[Override]
273
280
public function firstOrCreate (array $ attributes = [], array $ values = [])
274
281
{
275
282
$ instance = (clone $ this )->where ($ attributes )->first ();
@@ -285,6 +292,7 @@ public function firstOrCreate(array $attributes = [], array $values = [])
285
292
return $ this ->createOrFirst ($ attributes , $ values );
286
293
}
287
294
295
+ #[Override]
288
296
public function createOrFirst (array $ attributes = [], array $ values = [])
289
297
{
290
298
// The duplicate key error would abort the transaction. Using the regular firstOrCreate in that case.
@@ -308,9 +316,8 @@ public function createOrFirst(array $attributes = [], array $values = [])
308
316
* TODO Remove if https://github.com/laravel/framework/commit/6484744326531829341e1ff886cc9b628b20d73e
309
317
* will be reverted
310
318
* Issue in laravel/frawework https://github.com/laravel/framework/issues/27791.
311
- *
312
- * @return array
313
319
*/
320
+ #[Override]
314
321
protected function addUpdatedAtColumn (array $ values )
315
322
{
316
323
if (! $ this ->model ->usesTimestamps () || $ this ->model ->getUpdatedAtColumn () === null ) {
@@ -332,6 +339,7 @@ public function getConnection(): Connection
332
339
}
333
340
334
341
/** @inheritdoc */
342
+ #[Override]
335
343
protected function ensureOrderForCursorPagination ($ shouldReverse = false )
336
344
{
337
345
if (empty ($ this ->query ->orders )) {
0 commit comments