From 379e406ed02320e8326c55aa29fd21251c79a7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 14 Oct 2024 12:49:54 +0200 Subject: [PATCH 1/2] Fix array shape for Collection::listSearchIndex $options --- src/Collection.php | 2 +- src/Operation/ListSearchIndexes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Collection.php b/src/Collection.php index 81a0c7969..d79efbf87 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -896,7 +896,7 @@ public function listIndexes(array $options = []) * Returns information for all Atlas Search indexes for the collection. * Only available when used against a 7.0+ Atlas cluster. * - * @param array{name?: string} $options Command options + * @param array{name?: string, ...} $options Command options * @return Countable&Iterator * @throws InvalidArgumentException for parameter/option parsing errors * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/ListSearchIndexes.php b/src/Operation/ListSearchIndexes.php index 8cf7f1e56..15ed385eb 100644 --- a/src/Operation/ListSearchIndexes.php +++ b/src/Operation/ListSearchIndexes.php @@ -48,7 +48,7 @@ class ListSearchIndexes implements Executable * * @param string $databaseName Database name * @param string $collectionName Collection name - * @param array{name?: string} $options Command options + * @param array{name?: string, ...} $options Command options */ public function __construct(string $databaseName, string $collectionName, array $options = []) { From d8189f15118b671469d20d864381270608081186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 14 Oct 2024 14:22:21 +0200 Subject: [PATCH 2/2] Remove array shape, not supported by phpcs --- src/Collection.php | 2 +- src/Operation/ListSearchIndexes.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Collection.php b/src/Collection.php index d79efbf87..3ee3e7150 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -896,7 +896,7 @@ public function listIndexes(array $options = []) * Returns information for all Atlas Search indexes for the collection. * Only available when used against a 7.0+ Atlas cluster. * - * @param array{name?: string, ...} $options Command options + * @param array $options Command options * @return Countable&Iterator * @throws InvalidArgumentException for parameter/option parsing errors * @throws DriverRuntimeException for other driver errors (e.g. connection errors) diff --git a/src/Operation/ListSearchIndexes.php b/src/Operation/ListSearchIndexes.php index 15ed385eb..6607198d2 100644 --- a/src/Operation/ListSearchIndexes.php +++ b/src/Operation/ListSearchIndexes.php @@ -46,9 +46,9 @@ class ListSearchIndexes implements Executable /** * Constructs an aggregate command for listing Atlas Search indexes * - * @param string $databaseName Database name - * @param string $collectionName Collection name - * @param array{name?: string, ...} $options Command options + * @param string $databaseName Database name + * @param string $collectionName Collection name + * @param array $options Command options */ public function __construct(string $databaseName, string $collectionName, array $options = []) {