Skip to content

PHPLIB-1056: Add missing types in reference doc #1076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function count($filter = [], array $options = []): integer
function count(array|object $filter = [], array $options = []): integer

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-countDocuments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function countDocuments($filter = [], array $options = []): integer
function countDocuments(array|object $filter = [], array $options = []): integer

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-createIndex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function createIndex($key, array $options = []): string
function createIndex(array|object $key, array $options = []): string

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-deleteMany.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function deleteMany($filter, array $options = []): MongoDB\DeleteResult
function deleteMany(array|object $filter, array $options = []): MongoDB\DeleteResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-deleteOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function deleteOne($filter, array $options = []): MongoDB\DeleteResult
function deleteOne(array|object $filter, array $options = []): MongoDB\DeleteResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-distinct.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function distinct(string $fieldName, $filter = [], array $options = []): mixed[]
function distinct(string $fieldName, array|object $filter = [], array $options = []): mixed[]

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-dropIndex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function dropIndex($indexName, array $options = []): array|object
function dropIndex(string|MongoDB\Model\IndexInfo $indexName, array $options = []): array|object

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-find.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function find($filter = [], array $options = []): MongoDB\Driver\Cursor
function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-findOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function findOne($filter = [], array $options = []): array|object|null
function findOne(array|object $filter = [], array $options = []): array|object|null

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function findOneAndDelete($filter = [], array $options = []): object|null
function findOneAndDelete(array|object $filter = [], array $options = []): object|null

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function findOneAndReplace($filter, $replacement, array $options = []): object|null
function findOneAndReplace(array|object $filter, array|object $replacement, array $options = []): object|null

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function findOneAndUpdate($filter, $update, array $options = []): object|null
function findOneAndUpdate(array|object $filter, array|object $update, array $options = []): object|null

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-insertOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function insertOne($document, array $options = []): MongoDB\InsertOneResult
function insertOne(array|object $document, array $options = []): MongoDB\InsertOneResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-mapReduce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Definition

.. code-block:: php

function mapReduce($map, $reduce, $out, array $options = []): MongoDB\MapReduceResult
function mapReduce(MongoDB\BSON\JavascriptInterface $map, MongoDB\BSON\JavascriptInterface $reduce, string|array|object $out, array $options = []): MongoDB\MapReduceResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-replaceOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function replaceOne($filter, $replacement, array $options = []): MongoDB\UpdateResult
function replaceOne(array|object $filter, array|object $replacement, array $options = []): MongoDB\UpdateResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-updateMany.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function updateMany($filter, $update, array $options = []): MongoDB\UpdateResult
function updateMany(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBCollection-updateOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function updateOne($filter, $update, array $options = []): MongoDB\UpdateResult
function updateOne(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase-command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Definition

.. code-block:: php

function command($command, array $options = []): MongoDB\Driver\Cursor
function command(array|object $command, array $options = []): MongoDB\Driver\Cursor

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase-createCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function createCollection($collectionName, array $options = []): array|object
function createCollection(string $collectionName, array $options = []): array|object

MongoDB creates collections implicitly when you first reference the
collection in a command, such as when inserting a document into a new
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase-dropCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function dropCollection($collectionName, array $options = []): array|object
function dropCollection(string $collectionName, array $options = []): array|object

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase-modifyCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Definition

.. code-block:: php

function modifyCollection($collectionName, array $collectionOptions, array $options = []): array|object
function modifyCollection(string $collectionName, array $collectionOptions, array $options = []): array|object

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase-selectCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function selectCollection($collectionName, array $options = []): MongoDB\Collection
function selectCollection(string $collectionName, array $options = []): MongoDB\Collection

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBDatabase__get.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function __get($collectionName): MongoDB\Collection
function __get(string $collectionName): MongoDB\Collection

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Definition

.. code-block:: php

function downloadToStreamByName(string $filename, $destination, array $options = []): void
function downloadToStreamByName(string $filename, resource $destination, array $options = []): void

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBGridFSBucket-find.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function find($filter = [], array $options = []): MongoDB\Driver\Cursor
function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor

This method has the following parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/method/MongoDBGridFSBucket-findOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Definition

.. code-block:: php

function findOne($filter = [], array $options = []): array|object|null
function findOne(array|object $filter = [], array $options = []): array|object|null

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function getFileDocumentForStream($stream): array|object
function getFileDocumentForStream(resource $stream): array|object

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function getFileIdForStream($stream): mixed
function getFileIdForStream(resource $stream): mixed

This method has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Definition

.. code-block:: php

function uploadFromStream(string $filename, $source, array $options = []): mixed
function uploadFromStream(string $filename, resource $source, array $options = []): mixed

This method has the following parameters:

Expand Down