Skip to content

Commit 040393e

Browse files
committed
PHPLIB-1114: Replace Cursor types with CursorInterface
1 parent bf2470c commit 040393e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Operation/Aggregate.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
use MongoDB\Codec\DocumentCodec;
2121
use MongoDB\Driver\Command;
22-
use MongoDB\Driver\Cursor;
2322
use MongoDB\Driver\CursorInterface;
2423
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
2524
use MongoDB\Driver\ReadConcern;
@@ -317,7 +316,7 @@ private function createCommandOptions(): array
317316
* @see https://php.net/manual/en/mongodb-driver-server.executereadcommand.php
318317
* @see https://php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
319318
*/
320-
private function executeCommand(Server $server, Command $command): Cursor
319+
private function executeCommand(Server $server, Command $command): CursorInterface
321320
{
322321
$options = [];
323322

src/Operation/DatabaseCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace MongoDB\Operation;
1919

2020
use MongoDB\Driver\Command;
21-
use MongoDB\Driver\Cursor;
21+
use MongoDB\Driver\CursorInterface;
2222
use MongoDB\Driver\ReadPreference;
2323
use MongoDB\Driver\Server;
2424
use MongoDB\Driver\Session;
@@ -83,7 +83,7 @@ public function __construct(private string $databaseName, array|object $command,
8383
*
8484
* @see Executable::execute()
8585
*/
86-
public function execute(Server $server): Cursor
86+
public function execute(Server $server): CursorInterface
8787
{
8888
$cursor = $server->executeCommand($this->databaseName, $this->command, $this->createOptions());
8989

0 commit comments

Comments
 (0)