Skip to content

Commit f56ae4e

Browse files
committed
Remove unnecessary property for isExplain
1 parent a6a74ea commit f56ae4e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Operation/Aggregate.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class Aggregate implements Executable, Explainable
5555

5656
private array $options;
5757

58-
private bool $isExplain;
59-
6058
private bool $isWrite;
6159

6260
/**
@@ -195,8 +193,7 @@ public function __construct(string $databaseName, ?string $collectionName, array
195193
unset($options['writeConcern']);
196194
}
197195

198-
$this->isExplain = ! empty($options['explain']);
199-
$this->isWrite = is_last_pipeline_operator_write($pipeline) && ! $this->isExplain;
196+
$this->isWrite = is_last_pipeline_operator_write($pipeline) && ! ($this->options['explain'] ?? false);
200197

201198
if ($this->isWrite) {
202199
/* Ignore batchSize for writes, since no documents are returned and

0 commit comments

Comments
 (0)