File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -1027,17 +1027,14 @@ public function listIndexes(array $options = [])
1027
1027
* Returns information for all Atlas Search indexes for the collection.
1028
1028
* Only available when used against a 7.0+ Atlas cluster.
1029
1029
*
1030
+ * @param array{name?: string} $options Command options
1030
1031
* @return Iterator&Countable
1031
1032
* @throws InvalidArgumentException for parameter/option parsing errors
1032
1033
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
1033
- * @see ListSearchIndexes::__construct() for supported aggregation and list options
1034
+ * @see ListSearchIndexes::__construct() for supported options
1034
1035
*/
1035
- public function listSearchIndexes (? string $ name = null , array $ options = []): Iterator
1036
+ public function listSearchIndexes (array $ options = []): Iterator
1036
1037
{
1037
- if ($ name !== null ) {
1038
- $ options ['name ' ] = $ name ;
1039
- }
1040
-
1041
1038
$ operation = new ListSearchIndexes ($ this ->databaseName , $ this ->collectionName , $ options );
1042
1039
$ server = select_server ($ this ->manager , $ options );
1043
1040
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ class ListSearchIndexes implements Executable
55
55
/**
56
56
* Constructs an aggregate command for listing Atlas Search indexes
57
57
*
58
- * @param string $databaseName Database name
59
- * @param string $collectionName Collection name
60
- * @param array $options Command options
58
+ * @param string $databaseName Database name
59
+ * @param string $collectionName Collection name
60
+ * @param array{name?: string} $options Command options
61
61
*/
62
62
public function __construct (string $ databaseName , string $ collectionName , array $ options = [])
63
63
{
Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ function (IndexInfo $info) {
584
584
return $ collection ->updateSearchIndex ($ args ['name ' ], $ args ['definition ' ]);
585
585
586
586
case 'listSearchIndexes ' :
587
- return $ collection ->listSearchIndexes ($ args[ ' name ' ] ?? null , (array ) ($ args ['aggregationOptions ' ] ?? []));
587
+ return $ collection ->listSearchIndexes ($ args + (array ) ($ args ['aggregationOptions ' ] ?? []));
588
588
589
589
default :
590
590
Assert::fail ('Unsupported collection operation: ' . $ this ->name );
You can’t perform that action at this time.
0 commit comments