@@ -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/> |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | class MongoClient |
| 24 | 24 | { |
| 25 | 25 | const VERSION = '1.6.12'; |
| 26 | - const DEFAULT_HOST = "localhost" ; |
|
| 27 | - const DEFAULT_PORT = 27017 ; |
|
| 28 | - const RP_PRIMARY = "primary" ; |
|
| 29 | - const RP_PRIMARY_PREFERRED = "primaryPreferred" ; |
|
| 30 | - const RP_SECONDARY = "secondary" ; |
|
| 31 | - const RP_SECONDARY_PREFERRED = "secondaryPreferred" ; |
|
| 32 | - const RP_NEAREST = "nearest" ; |
|
| 26 | + const DEFAULT_HOST = "localhost"; |
|
| 27 | + const DEFAULT_PORT = 27017; |
|
| 28 | + const RP_PRIMARY = "primary"; |
|
| 29 | + const RP_PRIMARY_PREFERRED = "primaryPreferred"; |
|
| 30 | + const RP_SECONDARY = "secondary"; |
|
| 31 | + const RP_SECONDARY_PREFERRED = "secondaryPreferred"; |
|
| 32 | + const RP_NEAREST = "nearest"; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * @var bool |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * {@link http://www.php.net/manual/en/class.mongoint64.php MongoInt64} class. The latter is necessary on 32 |
| 199 | 199 | * bit platforms (and Windows). |
| 200 | 200 | */ |
| 201 | - public function killCursor($server_hash , $id) |
|
| 201 | + public function killCursor($server_hash, $id) |
|
| 202 | 202 | { |
| 203 | 203 | |
| 204 | 204 | } |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * @throws MongoCursorException |
| 326 | 326 | * @return boolean |
| 327 | 327 | */ |
| 328 | - public function update(array $criteria , array $newobj, array $options = array()) |
|
| 328 | + public function update(array $criteria, array $newobj, array $options = array()) |
|
| 329 | 329 | { |
| 330 | 330 | $multiple = ($options['multiple']) ? $options['multiple'] : false; |
| 331 | 331 | // $multiple = $options['multiple'] ?? false; |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | * @param array $query An optional query parameters |
| 401 | 401 | * @return array|bool Returns an array of distinct values, or <b>FALSE</b> on failure |
| 402 | 402 | */ |
| 403 | - public function distinct ($key, array $query = NULL) {} |
|
| 403 | + public function distinct($key, array $query = NULL) {} |
|
| 404 | 404 | |
| 405 | 405 | /** |
| 406 | 406 | * Update a document and return it |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | * @param array $options An array of options to apply, such as remove the match document from the DB and return it. |
| 412 | 412 | * @return array Returns the original document, or the modified document when new is set. |
| 413 | 413 | */ |
| 414 | - public function findAndModify (array $query, array $update = NULL, array $fields = NULL, array $options = NULL) {} |
|
| 414 | + public function findAndModify(array $query, array $update = NULL, array $fields = NULL, array $options = NULL) {} |
|
| 415 | 415 | |
| 416 | 416 | /** |
| 417 | 417 | * Querys this collection, returning a single element |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @return mixed Can return any type. |
| 21 | 21 | * @since 5.0.0 |
| 22 | 22 | */ |
| 23 | - public function current(){} |
|
| 23 | + public function current() {} |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Move forward to next element |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @return void Any returned value is ignored. |
| 29 | 29 | * @since 5.0.0 |
| 30 | 30 | */ |
| 31 | - public function next(){} |
|
| 31 | + public function next() {} |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Return the key of the current element |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @return mixed scalar on success, or null on failure. |
| 37 | 37 | * @since 5.0.0 |
| 38 | 38 | */ |
| 39 | - public function key(){} |
|
| 39 | + public function key() {} |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Checks if current position is valid |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * Returns true on success or false on failure. |
| 46 | 46 | * @since 5.0.0 |
| 47 | 47 | */ |
| 48 | - public function valid(){} |
|
| 48 | + public function valid() {} |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Rewind the Iterator to the first element |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @return void Any returned value is ignored. |
| 54 | 54 | * @since 5.0.0 |
| 55 | 55 | */ |
| 56 | - public function rewind(){} |
|
| 56 | + public function rewind() {} |
|
| 57 | 57 | |
| 58 | 58 | function batchSize(int $batchSize):MongoCursorInterface{} |
| 59 | 59 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @param bool $wait [optional] <p>If the cursor should wait for more data to become available.</p> |
| 54 | 54 | * @return MongoCursor Returns this cursor. |
| 55 | 55 | */ |
| 56 | - public function awaitData ($wait = true) {} |
|
| 56 | + public function awaitData($wait = true) {} |
|
| 57 | 57 | /** |
| 58 | 58 | * Checks if there are any more elements in this cursor |
| 59 | 59 | * @link http://www.php.net/manual/en/mongocursor.hasnext.php |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @return array This function returns an array describing the read preference. The array contains the values <em>type</em> for the string |
| 79 | 79 | * read preference mode (corresponding to the {@link http://www.php.net/manual/en/class.mongoclient.php MongoClient} constants), and <em>tagsets</em> containing a list of all tag set criteria. If no tag sets were specified, <em>tagsets</em> will not be present in the array. |
| 80 | 80 | */ |
| 81 | - public function getReadPreference () { } |
|
| 81 | + public function getReadPreference() { } |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * Limits the number of results returned |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @param bool $okay [optional] <p>If receiving partial results is okay.</p> |
| 96 | 96 | * @return MongoCursor Returns this cursor. |
| 97 | 97 | */ |
| 98 | - public function partial ($okay = true) {} |
|
| 98 | + public function partial($okay = true) {} |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * (PECL mongo >= 1.2.1)<br/> |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param bool $set [optional] <p>Whether the flag should be set (<b>TRUE</b>) or unset (<b>FALSE</b>).</p> |
| 110 | 110 | * @return MongoCursor |
| 111 | 111 | */ |
| 112 | - public function setFlag ($flag, $set = true ) {} |
|
| 112 | + public function setFlag($flag, $set = true) {} |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * (PECL mongo >= 1.3.3)<br/> |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param array $tags [optional] <p>The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient::RP_NEAREST.</p> |
| 119 | 119 | * @return MongoCursor Returns this cursor. |
| 120 | 120 | */ |
| 121 | - public function setReadPreference ($read_preference, array $tags) {} |
|
| 121 | + public function setReadPreference($read_preference, array $tags) {} |
|
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | 124 | * Skips a number of results |
@@ -284,14 +284,14 @@ discard block |
||
| 284 | 284 | * @throws MongoCursorException |
| 285 | 285 | * @return MongoCursor |
| 286 | 286 | */ |
| 287 | - public function fields(array $f){} |
|
| 287 | + public function fields(array $f) {} |
|
| 288 | 288 | |
| 289 | 289 | /** |
| 290 | 290 | * Gets the query, fields, limit, and skip for this cursor |
| 291 | 291 | * @link http://www.php.net/manual/en/mongocursor.info.php |
| 292 | 292 | * @return array The query, fields, limit, and skip for this cursor as an associative array. |
| 293 | 293 | */ |
| 294 | - public function info(){} |
|
| 294 | + public function info() {} |
|
| 295 | 295 | |
| 296 | 296 | /** |
| 297 | 297 | * PECL mongo >=1.0.11 |
@@ -321,6 +321,6 @@ discard block |
||
| 321 | 321 | * @return MongoCursor Returns this cursor. |
| 322 | 322 | * @link http://docs.php.net/manual/en/mongocursor.batchsize.php |
| 323 | 323 | */ |
| 324 | - public function batchSize($batchSize){} |
|
| 324 | + public function batchSize($batchSize) {} |
|
| 325 | 325 | } |
| 326 | 326 | |
@@ -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 | |
@@ -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 |
@@ -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 | |