Skip to content

Commit 2492235

Browse files
committed
Simplify double isset check
1 parent fd78b93 commit 2492235

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Operation/ReplaceOne.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ public function __construct(string $databaseName, string $collectionName, $filte
8787
throw InvalidArgumentException::invalidType('"codec" option', $options['codec'], DocumentCodec::class);
8888
}
8989

90-
if (isset($options['codec'])) {
91-
if (isset($options['typeMap'])) {
92-
throw InvalidArgumentException::cannotCombineCodecAndTypeMap();
93-
}
90+
if (isset($options['codec'], $options['typeMap'])) {
91+
throw InvalidArgumentException::cannotCombineCodecAndTypeMap();
9492
}
9593

9694
$this->update = new Update(

0 commit comments

Comments
 (0)