From 902762eb77eff34744040e55367c5eb41abd2cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Mon, 30 Sep 2024 09:53:06 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Andreas Braun --- UPGRADE-2.0.md | 2 +- src/Operation/DropCollection.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md index c69cceb8f..7f9577b6a 100644 --- a/UPGRADE-2.0.md +++ b/UPGRADE-2.0.md @@ -13,7 +13,7 @@ type changed to `void`. In case of an error, an exception is thrown. * `MongoDB\Client`: `dropDatabase` * `MongoDB\Collection`: `drop`, `dropIndex`, `dropIndexes`, `dropSearchIndex`, `rename` * `MongoDB\Database`: `createCollection`, `drop`, `dropCollection`, `modifyCollection`, `renameCollection` - * `MongoDB\Database::createEncryptedCollection()` return the list of encrypted fields + * `MongoDB\Database::createEncryptedCollection()` returns the list of encrypted fields If you still need to access the raw command result, you can use a `CommandSubscriber`. diff --git a/src/Operation/DropCollection.php b/src/Operation/DropCollection.php index 034704cee..c06994c4e 100644 --- a/src/Operation/DropCollection.php +++ b/src/Operation/DropCollection.php @@ -87,7 +87,7 @@ public function execute(Server $server): void $server->executeWriteCommand($this->databaseName, $this->createCommand(), $this->createOptions()); } catch (CommandException $e) { /* The server may return an error if the collection does not exist. - * Ignore the exception to make the drop operation is idempotent */ + * Ignore the exception to make the drop operation idempotent */ if ($e->getCode() === self::ERROR_CODE_NAMESPACE_NOT_FOUND) { return; }