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 @@ -1014,17 +1014,14 @@ public function listIndexes(array $options = [])
1014
1014
* Returns information for all Atlas Search indexes for the collection.
1015
1015
* Only available when used against a 7.0+ Atlas cluster.
1016
1016
*
1017
+ * @param array{name?: string} $options Command options
1017
1018
* @return Iterator&Countable
1018
1019
* @throws InvalidArgumentException for parameter/option parsing errors
1019
1020
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
1020
- * @see ListSearchIndexes::__construct() for supported aggregation and list options
1021
+ * @see ListSearchIndexes::__construct() for supported options
1021
1022
*/
1022
- public function listSearchIndexes (? string $ name = null , array $ options = []): Iterator
1023
+ public function listSearchIndexes (array $ options = []): Iterator
1023
1024
{
1024
- if ($ name !== null ) {
1025
- $ options ['name ' ] = $ name ;
1026
- }
1027
-
1028
1025
$ operation = new ListSearchIndexes ($ this ->databaseName , $ this ->collectionName , $ options );
1029
1026
$ server = select_server ($ this ->manager , $ options );
1030
1027
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 @@ -568,7 +568,7 @@ private function executeForCollection(Collection $collection)
568
568
return $ collection ->updateSearchIndex ($ args ['name ' ], $ args ['definition ' ]);
569
569
570
570
case 'listSearchIndexes ' :
571
- return $ collection ->listSearchIndexes ($ args[ ' name ' ] ?? null , (array ) ($ args ['aggregationOptions ' ] ?? []));
571
+ return $ collection ->listSearchIndexes ($ args + (array ) ($ args ['aggregationOptions ' ] ?? []));
572
572
573
573
default :
574
574
Assert::fail ('Unsupported collection operation: ' . $ this ->name );
You can’t perform that action at this time.
0 commit comments