Skip to content

Commit 4957c80

Browse files
committed
Merge pull request #298
2 parents 95b6190 + 28942f4 commit 4957c80

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Operation/Count.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function execute(Server $server)
130130

131131
$readPreference = isset($this->options['readPreference']) ? $this->options['readPreference'] : null;
132132

133-
$cursor = $server->executeCommand($this->databaseName, $this->createCommand($server), $readPreference);
133+
$cursor = $server->executeCommand($this->databaseName, $this->createCommand(), $readPreference);
134134
$result = current($cursor->toArray());
135135

136136
// Older server versions may return a float
@@ -144,10 +144,9 @@ public function execute(Server $server)
144144
/**
145145
* Create the count command.
146146
*
147-
* @param Server $server
148147
* @return Command
149148
*/
150-
private function createCommand(Server $server)
149+
private function createCommand()
151150
{
152151
$cmd = ['count' => $this->collectionName];
153152

src/Operation/Distinct.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ public function execute(Server $server)
120120
/**
121121
* Create the distinct command.
122122
*
123-
* @param Server $server
124123
* @return Command
125124
*/
126-
private function createCommand(Server $server)
125+
private function createCommand()
127126
{
128127
$cmd = [
129128
'distinct' => $this->collectionName,
@@ -142,7 +141,7 @@ private function createCommand(Server $server)
142141
$cmd['maxTimeMS'] = $this->options['maxTimeMS'];
143142
}
144143

145-
if (isset($this->options['readConcern']) && \MongoDB\server_supports_feature($server, self::$wireVersionForReadConcern)) {
144+
if (isset($this->options['readConcern'])) {
146145
$cmd['readConcern'] = \MongoDB\read_concern_as_document($this->options['readConcern']);
147146
}
148147

0 commit comments

Comments
 (0)