Skip to content

Commit f6d110f

Browse files
committed
CreateCollection::execute() may return an array
The return type documentation should have been updated when the typMap option was introduced in PHPLIB-164.
1 parent e2c4a0c commit f6d110f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function command($command, array $options = [])
166166
* @see CreateCollection::__construct() for supported options
167167
* @param string $collectionName
168168
* @param array $options
169-
* @return object Command result document
169+
* @return array|object Command result document
170170
*/
171171
public function createCollection($collectionName, array $options = [])
172172
{

src/Operation/CreateCollection.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ class CreateCollection implements Executable
3535
* the size option must also be specified. The default is false.
3636
*
3737
* * flags (integer): Options for the MMAPv1 storage engine only. Must be a
38-
* bitwise combination USE_POWER_OF_2_SIZES and NO_PADDING. The default
39-
* is USE_POWER_OF_2_SIZES.
38+
* bitwise combination CreateCollection::USE_POWER_OF_2_SIZES and
39+
* CreateCollection::NO_PADDING. The default is
40+
* CreateCollection::USE_POWER_OF_2_SIZES.
4041
*
4142
* * indexOptionDefaults (document): Default configuration for indexes when
4243
* creating the collection.
@@ -127,7 +128,7 @@ public function __construct($databaseName, $collectionName, array $options = [])
127128
*
128129
* @see Executable::execute()
129130
* @param Server $server
130-
* @return object Command result document
131+
* @return array|object Command result document
131132
*/
132133
public function execute(Server $server)
133134
{

0 commit comments

Comments
 (0)