File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public function execute(Server $server)
130
130
131
131
$ readPreference = isset ($ this ->options ['readPreference ' ]) ? $ this ->options ['readPreference ' ] : null ;
132
132
133
- $ cursor = $ server ->executeCommand ($ this ->databaseName , $ this ->createCommand ($ server ), $ readPreference );
133
+ $ cursor = $ server ->executeCommand ($ this ->databaseName , $ this ->createCommand (), $ readPreference );
134
134
$ result = current ($ cursor ->toArray ());
135
135
136
136
// Older server versions may return a float
@@ -144,10 +144,9 @@ public function execute(Server $server)
144
144
/**
145
145
* Create the count command.
146
146
*
147
- * @param Server $server
148
147
* @return Command
149
148
*/
150
- private function createCommand (Server $ server )
149
+ private function createCommand ()
151
150
{
152
151
$ cmd = ['count ' => $ this ->collectionName ];
153
152
Original file line number Diff line number Diff line change @@ -120,10 +120,9 @@ public function execute(Server $server)
120
120
/**
121
121
* Create the distinct command.
122
122
*
123
- * @param Server $server
124
123
* @return Command
125
124
*/
126
- private function createCommand (Server $ server )
125
+ private function createCommand ()
127
126
{
128
127
$ cmd = [
129
128
'distinct ' => $ this ->collectionName ,
@@ -142,7 +141,7 @@ private function createCommand(Server $server)
142
141
$ cmd ['maxTimeMS ' ] = $ this ->options ['maxTimeMS ' ];
143
142
}
144
143
145
- if (isset ($ this ->options ['readConcern ' ]) && \ MongoDB \server_supports_feature ( $ server , self :: $ wireVersionForReadConcern ) ) {
144
+ if (isset ($ this ->options ['readConcern ' ])) {
146
145
$ cmd ['readConcern ' ] = \MongoDB \read_concern_as_document ($ this ->options ['readConcern ' ]);
147
146
}
148
147
You can’t perform that action at this time.
0 commit comments