Skip to content

Commit 63001e2

Browse files
committed
FindOne::execute() may return an array
The return type documentation should have been updated when the typMap option was introduced in PHPLIB-133.
1 parent c31e530 commit 63001e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public function find($filter = [], array $options = [])
446446
* @see http://docs.mongodb.org/manual/core/read-operations-introduction/
447447
* @param array|object $filter Query by which to filter documents
448448
* @param array $options Additional options
449-
* @return object|null
449+
* @return array|object|null
450450
*/
451451
public function findOne($filter = [], array $options = [])
452452
{

src/Operation/FindOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct($databaseName, $collectionName, $filter, array $opti
7474
*
7575
* @see Executable::execute()
7676
* @param Server $server
77-
* @return object|null
77+
* @return array|object|null
7878
*/
7979
public function execute(Server $server)
8080
{

0 commit comments

Comments
 (0)