Skip to content

Commit e369a54

Browse files
committed
Add attribute to namespace
1 parent e10acc4 commit e369a54

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

src/Validation/DatabasePresenceVerifier.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use MongoDB\BSON\Regex;
88

9+
use Override;
910
use function array_map;
1011
use function implode;
1112
use function preg_quote;
@@ -15,14 +16,9 @@ class DatabasePresenceVerifier extends \Illuminate\Validation\DatabasePresenceVe
1516
/**
1617
* Count the number of objects in a collection having the given value.
1718
*
18-
* @param string $collection
19-
* @param string $column
20-
* @param string $value
21-
* @param int $excludeId
22-
* @param string $idColumn
23-
*
24-
* @return int
19+
* @inheritdoc
2520
*/
21+
#[Override]
2622
public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, array $extra = [])
2723
{
2824
$query = $this->table($collection)->where($column, new Regex('^' . preg_quote($value) . '$', '/i'));
@@ -41,13 +37,9 @@ public function getCount($collection, $column, $value, $excludeId = null, $idCol
4137
/**
4238
* Count the number of objects in a collection with the given values.
4339
*
44-
* @param string $collection
45-
* @param string $column
46-
* @param array $values
47-
* @param array $extra
48-
*
49-
* @return int
40+
* @inheritdoc
5041
*/
42+
#[Override]
5143
public function getMultiCount($collection, $column, array $values, array $extra = [])
5244
{
5345
// Nothing can match an empty array. Return early to avoid matching an empty string.

src/Validation/ValidationServiceProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
namespace MongoDB\Laravel\Validation;
66

77
use Illuminate\Validation\ValidationServiceProvider as BaseProvider;
8+
use Override;
89

910
class ValidationServiceProvider extends BaseProvider
1011
{
12+
/** @inheritdoc */
13+
#[Override]
1114
protected function registerPresenceVerifier()
1215
{
1316
$this->app->singleton('validation.presence', function ($app) {

0 commit comments

Comments
 (0)