@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * (PECL mongo >= 1.1.0)<br/> |
| 35 | 35 | * Returns the address being used by this for slaveOkay reads |
| 36 | 36 | * @link http://php.net/manual/en/mongo.getslave.php |
| 37 | - * @return bool <p>The address of the secondary this connection is using for reads. |
|
| 37 | + * @return boolean|null <p>The address of the secondary this connection is using for reads. |
|
| 38 | 38 | * </p> |
| 39 | 39 | * <p> |
| 40 | 40 | * This returns <b>NULL</b> if this is not connected to a replica set or not yet |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * (PECL mongo >= 1.1.0)<br/> |
| 47 | 47 | * Get slaveOkay setting for this connection |
| 48 | 48 | * @link http://php.net/manual/en/mongo.getslaveokay.php |
| 49 | - * @return bool Returns the value of slaveOkay for this instance. |
|
| 49 | + * @return boolean|null Returns the value of slaveOkay for this instance. |
|
| 50 | 50 | */ |
| 51 | 51 | public function getSlaveOkay() {} |
| 52 | 52 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @deprecated Pass a string of the form "mongodb://server1,server2" to the constructor instead of using this method. |
| 55 | 55 | * @link http://www.php.net/manual/en/mongo.pairconnect.php |
| 56 | 56 | * @throws MongoConnectionException |
| 57 | - * @return boolean |
|
| 57 | + * @return boolean|null |
|
| 58 | 58 | */ |
| 59 | 59 | public function pairConnect() {} |
| 60 | 60 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * If reads should be sent to secondary members of a replica set for all |
| 91 | 91 | * possible queries using this {@see MongoClient} instance. |
| 92 | 92 | * </p> |
| 93 | - * @return bool returns the former value of slaveOkay for this instance. |
|
| 93 | + * @return boolean|null returns the former value of slaveOkay for this instance. |
|
| 94 | 94 | */ |
| 95 | 95 | public function setSlaveOkay ($ok) {} |
| 96 | 96 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * Set the size for future connection pools. |
| 100 | 100 | * @link http://php.net/manual/en/mongo.setpoolsize.php |
| 101 | 101 | * @param $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p> |
| 102 | - * @return bool Returns the former value of pool size. |
|
| 102 | + * @return boolean|null Returns the former value of pool size. |
|
| 103 | 103 | */ |
| 104 | 104 | public function setPoolSize($size) {} |
| 105 | 105 | /** |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param string $username A username used to identify the connection. |
| 110 | 110 | * @param string $password A password used to identify the connection. |
| 111 | 111 | * @throws MongoConnectionException |
| 112 | - * @return boolean If the connection was successful. |
|
| 112 | + * @return boolean|null If the connection was successful. |
|
| 113 | 113 | */ |
| 114 | 114 | public function persistConnect($username = "", $password = "") {} |
| 115 | 115 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @param string $username A username used to identify the connection. |
| 121 | 121 | * @param string $password A password used to identify the connection. |
| 122 | 122 | * @throws MongoConnectionException |
| 123 | - * @return boolean If the connection was successful. |
|
| 123 | + * @return boolean|null If the connection was successful. |
|
| 124 | 124 | */ |
| 125 | 125 | public function pairPersistConnect($username = "", $password = "") {} |
| 126 | 126 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * |
| 130 | 130 | * @link http://www.php.net/manual/en/mongo.connectutil.php |
| 131 | 131 | * @throws MongoConnectionException |
| 132 | - * @return boolean If the connection was successful. |
|
| 132 | + * @return boolean|null If the connection was successful. |
|
| 133 | 133 | */ |
| 134 | 134 | protected function connectUtil() {} |
| 135 | 135 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * Creates a database error on the database. |
| 162 | 162 | * @deprecated Use MongoDB::forceError() instead. |
| 163 | 163 | * @link http://www.php.net/manual/en/mongo.forceerror.php |
| 164 | - * @return boolean The database response. |
|
| 164 | + * @return boolean|null The database response. |
|
| 165 | 165 | */ |
| 166 | 166 | public function forceError() {} |
| 167 | 167 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * </p> |
| 93 | 93 | * @return bool returns the former value of slaveOkay for this instance. |
| 94 | 94 | */ |
| 95 | - public function setSlaveOkay ($ok) {} |
|
| 95 | + public function setSlaveOkay($ok) {} |
|
| 96 | 96 | /** |
| 97 | 97 | * @deprecated Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead. |
| 98 | 98 | *(PECL mongo >= 1.2.0)<br/> |
@@ -266,7 +266,6 @@ discard block |
||
| 266 | 266 | * (PECL mongo >= 0.9.0)<br/> |
| 267 | 267 | * Get a list of collections in this database |
| 268 | 268 | * @link http://www.php.net/manual/en/mongodb.listcollections.php |
| 269 | - * @param bool $includeSystemCollections [optional] <p>Include system collections.</p> |
|
| 270 | 269 | * @return array Returns a list of MongoCollections. |
| 271 | 270 | */ |
| 272 | 271 | public function listCollections(array $options = []) |
@@ -410,7 +409,7 @@ discard block |
||
| 410 | 409 | * (PECL mongo >= 0.9.5)<br/> |
| 411 | 410 | * Creates a database error |
| 412 | 411 | * @link http://www.php.net/manual/en/mongodb.forceerror.php |
| 413 | - * @return boolean Returns the database response. |
|
| 412 | + * @return boolean|null Returns the database response. |
|
| 414 | 413 | */ |
| 415 | 414 | public function forceError() |
| 416 | 415 | { |
@@ -460,7 +459,7 @@ discard block |
||
| 460 | 459 | * @link http://www.php.net/manual/en/mongodb.setreadpreference.php |
| 461 | 460 | * @param string $read_preference <p>The read preference mode: <b>MongoClient::RP_PRIMARY</b>, <b>MongoClient::RP_PRIMARY_PREFERRED</b>, <b>MongoClient::RP_SECONDARY</b>, <b>MongoClient::RP_SECONDARY_PREFERRED</b>, or <b>MongoClient::RP_NEAREST</b>.</p> |
| 462 | 461 | * @param array $tags [optional] <p>An array of zero or more tag sets, where each tag set is itself an array of criteria used to match tags on replica set members.</p> |
| 463 | - * @return boolean Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise. |
|
| 462 | + * @return boolean|null Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise. |
|
| 464 | 463 | */ |
| 465 | 464 | public function setReadPreference($read_preference, array $tags) |
| 466 | 465 | { |
@@ -472,8 +471,7 @@ discard block |
||
| 472 | 471 | * @link http://php.net/manual/en/mongodb.setwriteconcern.php |
| 473 | 472 | * Set the write concern for this database |
| 474 | 473 | * @param mixed $w <p>The write concern. This may be an integer denoting the number of servers required to acknowledge the write, or a string mode (e.g. "majority").</p> |
| 475 | - * @param int $wtimeout[optional] <p>The maximum number of milliseconds to wait for the server to satisfy the write concern.</p> |
|
| 476 | - * @return boolean Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise. |
|
| 474 | + * @return boolean|null Returns <b>TRUE</b> on success, or <b>FALSE</b> otherwise. |
|
| 477 | 475 | */ |
| 478 | 476 | public function setWriteConcern($w, $wtimeout) |
| 479 | 477 | { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $collections = $this->db->listCollections($options); |
| 105 | 105 | |
| 106 | - $getCollectionName = function (CollectionInfo $collectionInfo) { |
|
| 106 | + $getCollectionName = function(CollectionInfo $collectionInfo) { |
|
| 107 | 107 | return $collectionInfo->getName(); |
| 108 | 108 | }; |
| 109 | 109 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * </p> |
| 205 | 205 | * @return bool Returns the former value of slaveOkay for this instance. |
| 206 | 206 | */ |
| 207 | - public function setSlaveOkay ($ok = true) |
|
| 207 | + public function setSlaveOkay($ok = true) |
|
| 208 | 208 | { |
| 209 | 209 | return false; |
| 210 | 210 | } |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | $id = isset($document_or_id->_id) ? $document_or_id->_id : null; |
| 297 | 297 | // $id = $document_or_id->_id ?? null; |
| 298 | 298 | } elseif (is_array($document_or_id)) { |
| 299 | - if (! isset($document_or_id['_id'])) { |
|
| 299 | + if (!isset($document_or_id['_id'])) { |
|
| 300 | 300 | return null; |
| 301 | 301 | } |
| 302 | 302 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @link http://php.net/manual/en/mongogridfs.construct.php |
| 46 | 46 | * @param MongoDB $db Database |
| 47 | 47 | * @param string $prefix [optional] <p>Optional collection name prefix.</p> |
| 48 | - * @param mixed $chunks [optional] |
|
| 48 | + * @param string $chunks [optional] |
|
| 49 | 49 | * @return MongoGridFS |
| 50 | 50 | */ |
| 51 | 51 | public function __construct($db, $prefix = "fs", $chunks = "fs") {} |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param array $criteria Description of records to remove. |
| 101 | 101 | * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded. |
| 102 | 102 | * @throws MongoCursorException |
| 103 | - * @return boolean |
|
| 103 | + * @return boolean|null |
|
| 104 | 104 | */ |
| 105 | 105 | public function remove(array $criteria = array(), array $options = array()) {} |
| 106 | 106 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * Delete a file from the database |
| 109 | 109 | * @link http://php.net/manual/en/mongogridfs.delete.php |
| 110 | 110 | * @param mixed $id _id of the file to remove |
| 111 | - * @return boolean Returns true if the remove was successfully sent to the database. |
|
| 111 | + * @return boolean|null Returns true if the remove was successfully sent to the database. |
|
| 112 | 112 | */ |
| 113 | 113 | public function delete($id) {} |
| 114 | 114 | |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | /** |
| 203 | - * @param $id |
|
| 203 | + * @param string|null $id |
|
| 204 | 204 | * @throws MongoException |
| 205 | 205 | */ |
| 206 | 206 | private function createObjectID($id) |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | * |
| 98 | 98 | * <p>The log message itself.</p></li> |
| 99 | 99 | * <ul> |
| 100 | - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 100 | + * @return boolean|null Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 101 | 101 | */ |
| 102 | 102 | public static function setCallback ( callable $log_function ) {} |
| 103 | 103 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | * <ul> |
| 100 | 100 | * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
| 101 | 101 | */ |
| 102 | - public static function setCallback ( callable $log_function ) {} |
|
| 102 | + public static function setCallback(callable $log_function) {} |
|
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * This function can be used to set how verbose logging should be and the types of |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @param int $size The max number of connections future pools will be able to |
| 51 | 51 | * create. Negative numbers mean that the pool will spawn an infinite number of |
| 52 | 52 | * connections |
| 53 | - * @return boolean Returns the former value of pool size |
|
| 53 | + * @return boolean|null Returns the former value of pool size |
|
| 54 | 54 | */ |
| 55 | 55 | public static function setSize($size) {} |
| 56 | 56 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * http://php.net/manual/en/mongoresultexception.getdocument.php |
| 26 | 26 | * @return array <p>The full result document as an array, including partial data if available and additional keys.</p> |
| 27 | 27 | */ |
| 28 | - public function getDocument () {} |
|
| 28 | + public function getDocument() {} |
|
| 29 | 29 | |
| 30 | 30 | public $document; |
| 31 | 31 | |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | use Alcaeus\MongoDbAdapter\TypeInterface; |
| 17 | 17 | use MongoDB\BSON\Binary; |
| 18 | -use MongoDB\BSON\Type; |
|
| 19 | 18 | |
| 20 | 19 | class MongoBinData implements TypeInterface |
| 21 | 20 | { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | return; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! preg_match('#^/(.*)/([imxslu]*)$#', $regex, $matches)) { |
|
| 46 | + if (!preg_match('#^/(.*)/([imxslu]*)$#', $regex, $matches)) { |
|
| 47 | 47 | throw new MongoException('invalid regex', 9); |
| 48 | 48 | } |
| 49 | 49 | |