Commit 21d35954 authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #578

parents a6e85ffb 184a57fb
......@@ -97,6 +97,7 @@ class ChangeStream implements Iterator
/**
* @see http://php.net/iterator.next
* @return void
* @throws ResumeTokenException
*/
public function next()
{
......@@ -128,6 +129,7 @@ class ChangeStream implements Iterator
/**
* @see http://php.net/iterator.rewind
* @return void
* @throws ResumeTokenException
*/
public function rewind()
{
......
......@@ -20,6 +20,7 @@ namespace MongoDB;
use MongoDB\Driver\Manager;
use MongoDB\Driver\ReadConcern;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\Session;
use MongoDB\Driver\WriteConcern;
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
use MongoDB\Driver\Exception\InvalidArgumentException as DriverInvalidArgumentException;
......@@ -217,6 +218,7 @@ class Client
* List databases.
*
* @see ListDatabases::__construct() for supported options
* @param array $options
* @return DatabaseInfoIterator
* @throws UnexpectedValueException if the command response was malformed
* @throws InvalidArgumentException for parameter/option parsing errors
......@@ -268,7 +270,7 @@ class Client
*
* @see http://php.net/manual/en/mongodb-driver-manager.startsession.php
* @param array $options Session options
* @return MongoDB\Driver\Session
* @return Session
*/
public function startSession(array $options = [])
{
......
......@@ -896,6 +896,7 @@ class Collection
* Returns information for all indexes for the collection.
*
* @see ListIndexes::__construct() for supported options
* @param array $options
* @return IndexInfoIterator
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
......
......@@ -350,6 +350,7 @@ class Database
* @param string $collectionName Collection or view to modify
* @param array $collectionOptions Collection or view options to assign
* @param array $options Command options
* @return array|object
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
*/
......
......@@ -25,6 +25,7 @@ use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\UnsupportedException;
use MongoDB\GridFS\Exception\CorruptFileException;
use MongoDB\GridFS\Exception\FileNotFoundException;
use MongoDB\Operation\Find;
......
......@@ -18,6 +18,7 @@
namespace MongoDB\GridFS;
use MongoDB\Collection;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\UpdateResult;
use MongoDB\Driver\Cursor;
use MongoDB\Driver\Manager;
......
......@@ -96,6 +96,7 @@ class StreamWrapper
* @param string $mode Mode used to open the file (only "r" and "w" are supported)
* @param integer $options Additional flags set by the streams API
* @param string $openedPath Not used
* @return boolean
*/
public function stream_open($path, $mode, $options, &$openedPath)
{
......
......@@ -49,6 +49,9 @@ class BSONDocument extends ArrayObject implements JsonSerializable, Serializable
* by default.
*
* @see http://php.net/arrayobject.construct
* @param array $input
* @param integer $flags
* @param string $iterator_class
*/
public function __construct($input = [], $flags = ArrayObject::ARRAY_AS_PROPS, $iterator_class = 'ArrayIterator')
{
......
......@@ -17,6 +17,7 @@
namespace MongoDB\Model;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\UnexpectedValueException;
use MongoDB\Model\BSONDocument;
use Iterator;
......
......@@ -134,6 +134,8 @@ class CollectionInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
*/
public function offsetSet($key, $value)
......@@ -145,6 +147,7 @@ class CollectionInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
*/
public function offsetUnset($key)
......
......@@ -112,6 +112,8 @@ class DatabaseInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
*/
public function offsetSet($key, $value)
......@@ -123,6 +125,7 @@ class DatabaseInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
*/
public function offsetUnset($key)
......
......@@ -206,6 +206,8 @@ class IndexInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
*/
public function offsetSet($key, $value)
......@@ -217,6 +219,7 @@ class IndexInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
*/
public function offsetUnset($key)
......
......@@ -78,7 +78,7 @@ class IndexInput implements Serializable
/**
* Return the index name.
*
* @param string
* @return string
*/
public function __toString()
{
......
......@@ -46,6 +46,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
*
* @see http://php.net/arrayiterator.append
* @param mixed $value
* @throws BadMethodCallException
*/
public function append($value)
......@@ -124,9 +125,11 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
*
* @see http://php.net/arrayiterator.offsetset
* @param mixed $index
* @param mixed $value
* @throws BadMethodCallException
*/
public function offsetSet($index, $newval)
public function offsetSet($index, $value)
{
throw BadMethodCallException::classIsImmutable(__CLASS__);
}
......@@ -135,6 +138,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
*
* @see http://php.net/arrayiterator.offsetunset
* @param mixed $index
* @throws BadMethodCallException
*/
public function offsetUnset($index)
......@@ -146,6 +150,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
*
* @see http://php.net/arrayiterator.uasort
* @param callable $cmp_function
* @throws BadMethodCallException
*/
public function uasort($cmp_function)
......@@ -157,6 +162,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
*
* @see http://php.net/arrayiterator.uksort
* @param callable $cmp_function
* @throws BadMethodCallException
*/
public function uksort($cmp_function)
......
......@@ -336,6 +336,7 @@ class Aggregate implements Executable
* @see http://php.net/manual/en/mongodb-driver-server.executereadcommand.php
* @see http://php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
* @param boolean $hasOutStage
* @param boolean $hasExplain
* @return array
*/
private function createOptions($hasOutStage, $hasExplain)
......
......@@ -236,6 +236,7 @@ class FindAndModify implements Executable, Explainable
/**
* Create the findAndModify command document.
*
* @param Server $server
* @return array
*/
private function createCommandDocument(Server $server)
......
......@@ -18,7 +18,6 @@
namespace MongoDB\Operation;
use MongoDB\Driver\Command;
use MongoDB\Driver\Query;
use MongoDB\Driver\Server;
use MongoDB\Driver\Session;
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
......@@ -26,7 +25,6 @@ use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Model\CachingIterator;
use MongoDB\Model\CollectionInfoCommandIterator;
use MongoDB\Model\CollectionInfoIterator;
use MongoDB\Model\CollectionInfoLegacyIterator;
/**
* Operation for the listCollections command.
......
......@@ -23,6 +23,7 @@ use MongoDB\Driver\Session;
use MongoDB\Driver\WriteConcern;
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\UnsupportedException;
/**
* Operation for the collMod command.
......@@ -57,7 +58,7 @@ class ModifyCollection implements Executable
*
* @param string $databaseName Database name
* @param string $collectionName Collection or view to modify
* @param string $collectionOptions Collection or view options to assign
* @param array $collectionOptions Collection or view options to assign
* @param array $options Command options
* @throws InvalidArgumentException for parameter/option parsing errors
*/
......
......@@ -22,6 +22,7 @@ use MongoDB\Driver\ReadConcern;
use MongoDB\Driver\Server;
use MongoDB\Driver\WriteConcern;
use MongoDB\Exception\InvalidArgumentException;
use ReflectionException;
use stdClass;
use ReflectionClass;
......@@ -204,6 +205,7 @@ function is_string_array($input) {
* @see https://bugs.php.net/bug.php?id=49664
* @param mixed $element Value to be copied
* @return mixed
* @throws ReflectionException
*/
function recursive_copy($element) {
if (is_array($element)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment