Skip to content

Commit f12db5c

Browse files
committed
Add attribute to
1 parent 350e59e commit f12db5c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Connection.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use MongoDB\Driver\ReadPreference;
1717
use MongoDB\Laravel\Concerns\ManagesTransactions;
1818
use OutOfBoundsException;
19+
use Override;
1920
use Throwable;
2021

2122
use function filter_var;
@@ -95,6 +96,7 @@ public function __construct(array $config)
9596
*
9697
* @return Query\Builder
9798
*/
99+
#[Override]
98100
public function table($table, $as = null)
99101
{
100102
$query = new Query\Builder($this, $this->getQueryGrammar(), $this->getPostProcessor());
@@ -115,6 +117,7 @@ public function getCollection($name): Collection
115117
}
116118

117119
/** @inheritdoc */
120+
#[Override]
118121
public function getSchemaBuilder()
119122
{
120123
return new Schema\Builder($this);
@@ -172,6 +175,8 @@ public function getClient(): ?Client
172175
return $this->connection;
173176
}
174177

178+
/** @inheritdoc */
179+
#[Override]
175180
public function enableQueryLog()
176181
{
177182
parent::enableQueryLog();
@@ -182,6 +187,8 @@ public function enableQueryLog()
182187
}
183188
}
184189

190+
/** @inheritdoc */
191+
#[Override]
185192
public function disableQueryLog()
186193
{
187194
parent::disableQueryLog();
@@ -192,6 +199,7 @@ public function disableQueryLog()
192199
}
193200
}
194201

202+
#[Override]
195203
protected function withFreshQueryLog($callback)
196204
{
197205
try {
@@ -340,31 +348,36 @@ protected function getDsn(array $config): string
340348
}
341349

342350
/** @inheritdoc */
351+
#[Override]
343352
public function getDriverName()
344353
{
345354
return 'mongodb';
346355
}
347356

348357
/** @inheritdoc */
358+
#[Override]
349359
public function getDriverTitle()
350360
{
351361
return 'MongoDB';
352362
}
353363

354364
/** @inheritdoc */
365+
#[Override]
355366
protected function getDefaultPostProcessor()
356367
{
357368
return new Query\Processor();
358369
}
359370

360371
/** @inheritdoc */
372+
#[Override]
361373
protected function getDefaultQueryGrammar()
362374
{
363375
// Argument added in Laravel 12
364376
return new Query\Grammar($this);
365377
}
366378

367379
/** @inheritdoc */
380+
#[Override]
368381
protected function getDefaultSchemaGrammar()
369382
{
370383
// Argument added in Laravel 12
@@ -380,6 +393,7 @@ public function setDatabase(Database $db)
380393
}
381394

382395
/** @inheritdoc */
396+
#[Override]
383397
public function threadCount()
384398
{
385399
$status = $this->db->command(['serverStatus' => 1])->toArray();

0 commit comments

Comments
 (0)