Completed
Push — master ( e2cf37...bc2142 )
by Andreas
07:24 queued 19s
created
lib/Mongo/MongoCollection.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Mongo/MongoCursor.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
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
     {
@@ -512,6 +512,9 @@  discard block
 block discarded – undo
512 512
         return $this->ensureIterator()->valid();
513 513
     }
514 514
 
515
+    /**
516
+     * @param string[] $optionNames
517
+     */
515 518
     private function applyOptions($options, $optionNames)
516 519
     {
517 520
         foreach ($optionNames as $option) {
@@ -526,7 +529,7 @@  discard block
 block discarded – undo
526 529
     }
527 530
 
528 531
     /**
529
-     * @return Cursor
532
+     * @return Traversable
530 533
      */
531 534
     private function ensureCursor()
532 535
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -405,7 +405,7 @@
 block discarded – undo
405 405
      * @param bool $set [optional] <p>Whether the flag should be set (<b>TRUE</b>) or unset (<b>FALSE</b>).</p>
406 406
      * @return MongoCursor
407 407
      */
408
-    public function setFlag($flag, $set = true )
408
+    public function setFlag($flag, $set = true)
409 409
     {
410 410
         $this->notImplemented();
411 411
     }
Please login to merge, or discard this patch.
lib/Mongo/MongoRegex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Mongo/MongoDBRef.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.