@@ -49,7 +49,7 @@ public function testConstructorCollectionNameArgument($collectionName, string $e
49
49
new Collection ($ this ->manager , $ this ->getDatabaseName (), $ collectionName );
50
50
}
51
51
52
- public function provideInvalidDatabaseAndCollectionNames ()
52
+ public static function provideInvalidDatabaseAndCollectionNames ()
53
53
{
54
54
return [
55
55
[null , TypeError::class],
@@ -64,15 +64,15 @@ public function testConstructorOptionTypeChecks(array $options): void
64
64
new Collection ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), $ options );
65
65
}
66
66
67
- public function provideInvalidConstructorOptions (): array
67
+ public static function provideInvalidConstructorOptions (): array
68
68
{
69
- return $ this -> createOptionDataProvider ([
70
- 'builderEncoder ' => $ this -> getInvalidObjectValues (),
71
- 'codec ' => $ this -> getInvalidDocumentCodecValues (),
72
- 'readConcern ' => $ this -> getInvalidReadConcernValues (),
73
- 'readPreference ' => $ this -> getInvalidReadPreferenceValues (),
74
- 'typeMap ' => $ this -> getInvalidArrayValues (),
75
- 'writeConcern ' => $ this -> getInvalidWriteConcernValues (),
69
+ return self :: createOptionDataProvider ([
70
+ 'builderEncoder ' => self :: getInvalidObjectValues (),
71
+ 'codec ' => self :: getInvalidDocumentCodecValues (),
72
+ 'readConcern ' => self :: getInvalidReadConcernValues (),
73
+ 'readPreference ' => self :: getInvalidReadPreferenceValues (),
74
+ 'typeMap ' => self :: getInvalidArrayValues (),
75
+ 'writeConcern ' => self :: getInvalidWriteConcernValues (),
76
76
]);
77
77
}
78
78
@@ -210,7 +210,7 @@ public function testDistinctWithTypeMap(array $typeMap, array $expectedDocuments
210
210
$ this ->assertEquals ($ expectedDocuments , $ values );
211
211
}
212
212
213
- public function provideTypeMapOptionsAndExpectedDocuments ()
213
+ public static function provideTypeMapOptionsAndExpectedDocuments ()
214
214
{
215
215
return [
216
216
'No type map ' => [
@@ -448,7 +448,7 @@ public function testMapReduce(): void
448
448
}
449
449
}
450
450
451
- public function collectionMethodClosures ()
451
+ public static function collectionMethodClosures ()
452
452
{
453
453
return [
454
454
'read-only aggregate ' => [
@@ -716,18 +716,18 @@ function($collection, $session, $options = []) {
716
716
];
717
717
}
718
718
719
- public function collectionReadMethodClosures (): array
719
+ public static function collectionReadMethodClosures (): array
720
720
{
721
721
return array_filter (
722
- $ this -> collectionMethodClosures (),
722
+ self :: collectionMethodClosures (),
723
723
fn ($ rw ) => str_contains ($ rw [1 ], 'r ' ),
724
724
);
725
725
}
726
726
727
- public function collectionWriteMethodClosures (): array
727
+ public static function collectionWriteMethodClosures (): array
728
728
{
729
729
return array_filter (
730
- $ this -> collectionMethodClosures (),
730
+ self :: collectionMethodClosures (),
731
731
fn ($ rw ) => str_contains ($ rw [1 ], 'w ' ),
732
732
);
733
733
}
0 commit comments