Skip to content

Commit 65542b0

Browse files
committed
Add #[Override] attribute to Connection`
1 parent ae53fed commit 65542b0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Connection.php

Lines changed: 11 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,7 @@ public function enableQueryLog()
182187
}
183188
}
184189

190+
#[Override]
185191
public function disableQueryLog()
186192
{
187193
parent::disableQueryLog();
@@ -192,6 +198,7 @@ public function disableQueryLog()
192198
}
193199
}
194200

201+
#[Override]
195202
protected function withFreshQueryLog($callback)
196203
{
197204
try {
@@ -340,6 +347,7 @@ protected function getDsn(array $config): string
340347
}
341348

342349
/** @inheritdoc */
350+
#[Override]
343351
public function getDriverName()
344352
{
345353
return 'mongodb';
@@ -352,19 +360,22 @@ public function getDriverTitle()
352360
}
353361

354362
/** @inheritdoc */
363+
#[Override]
355364
protected function getDefaultPostProcessor()
356365
{
357366
return new Query\Processor();
358367
}
359368

360369
/** @inheritdoc */
370+
#[Override]
361371
protected function getDefaultQueryGrammar()
362372
{
363373
// Argument added in Laravel 12
364374
return new Query\Grammar($this);
365375
}
366376

367377
/** @inheritdoc */
378+
#[Override]
368379
protected function getDefaultSchemaGrammar()
369380
{
370381
// Argument added in Laravel 12

0 commit comments

Comments
 (0)