Commit 184a57fb authored by Marcin Pudełek's avatar Marcin Pudełek Committed by Jeremy Mikola

Clean up class imports and doc blocks

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