@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | /** |
133 | 133 | * @link http://www.php.net/manual/en/mongocollection.getslaveokay.php |
134 | - * @return bool |
|
134 | + * @return boolean|null |
|
135 | 135 | */ |
136 | 136 | public function getSlaveOkay() |
137 | 137 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | /** |
142 | 142 | * @link http://www.php.net/manual/en/mongocollection.setslaveokay.php |
143 | 143 | * @param bool $ok |
144 | - * @return bool |
|
144 | + * @return boolean|null |
|
145 | 145 | */ |
146 | 146 | public function setSlaveOkay($ok = true) |
147 | 147 | { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /** |
161 | 161 | * @param string $read_preference |
162 | 162 | * @param array $tags |
163 | - * @return bool |
|
163 | + * @return boolean|null |
|
164 | 164 | */ |
165 | 165 | public function setReadPreference($read_preference, array $tags) |
166 | 166 | { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error. |
197 | 197 | * @throws MongoCursorException if the "w" option is set and the write fails. |
198 | 198 | * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds. |
199 | - * @return bool|array Returns an array containing the status of the insertion if the "w" option is set. |
|
199 | + * @return MongoDB\InsertOneResult Returns an array containing the status of the insertion if the "w" option is set. |
|
200 | 200 | */ |
201 | 201 | public function insert($a, array $options = array()) |
202 | 202 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * @param array $a An array of arrays. |
210 | 210 | * @param array $options Options for the inserts. |
211 | 211 | * @throws MongoCursorException |
212 | - * @return mixed f "safe" is set, returns an associative array with the status of the inserts ("ok") and any error that may have occured ("err"). Otherwise, returns TRUE if the batch insert was successfully sent, FALSE otherwise. |
|
212 | + * @return MongoDB\InsertManyResult f "safe" is set, returns an associative array with the status of the inserts ("ok") and any error that may have occured ("err"). Otherwise, returns TRUE if the batch insert was successfully sent, FALSE otherwise. |
|
213 | 213 | */ |
214 | 214 | public function batchInsert(array $a, array $options = array()) |
215 | 215 | { |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | * @link http://www.php.net/manual/en/mongocollection.ensureindex.php |
377 | 377 | * @param array $keys Field or fields to use as index. |
378 | 378 | * @param array $options [optional] This parameter is an associative array of the form array("optionname" => <boolean>, ...). |
379 | - * @return boolean always true |
|
379 | + * @return boolean|null always true |
|
380 | 380 | */ |
381 | 381 | public function ensureIndex(array $keys, array $options = array()) {} |
382 | 382 |
@@ -245,7 +245,7 @@ |
||
245 | 245 | * @throws MongoCursorException |
246 | 246 | * @return boolean |
247 | 247 | */ |
248 | - public function update(array $criteria , array $newobj, array $options = array()) |
|
248 | + public function update(array $criteria, array $newobj, array $options = array()) |
|
249 | 249 | { |
250 | 250 | $multiple = ($options['multiple']) ? $options['multiple'] : false; |
251 | 251 | // $multiple = $options['multiple'] ?? false; |
@@ -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 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | */ |
78 | 78 | public static function get($db, $ref) |
79 | 79 | { |
80 | - if (! static::isRef($ref)) { |
|
80 | + if (!static::isRef($ref)) { |
|
81 | 81 | return null; |
82 | 82 | } |
83 | 83 |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | * @link http://www.php.net/manual/en/mongocursor.hasnext.php |
265 | 265 | * @throws MongoConnectionException |
266 | 266 | * @throws MongoCursorTimeoutException |
267 | - * @return bool Returns true if there is another element |
|
267 | + * @return boolean|null Returns true if there is another element |
|
268 | 268 | */ |
269 | 269 | public function hasNext() |
270 | 270 | { |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | } |
677 | 677 | |
678 | 678 | /** |
679 | - * @return Cursor |
|
679 | + * @return Traversable |
|
680 | 680 | */ |
681 | 681 | private function ensureCursor() |
682 | 682 | { |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | MongoClient::RP_SECONDARY_PREFERRED, |
465 | 465 | MongoClient::RP_NEAREST |
466 | 466 | ]; |
467 | - if (! in_array($readPreference, $availableReadPreferences)) { |
|
467 | + if (!in_array($readPreference, $availableReadPreferences)) { |
|
468 | 468 | trigger_error("The value '$readPreference' is not valid as read preference type", E_WARNING); |
469 | 469 | return $this; |
470 | 470 | } |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | */ |
622 | 622 | private function convertCursorType() |
623 | 623 | { |
624 | - if (! $this->tailable) { |
|
624 | + if (!$this->tailable) { |
|
625 | 625 | return null; |
626 | 626 | } |
627 | 627 |