Completed
Push — master ( 831a39...87acb3 )
by Andreas
04:32
created
lib/Mongo/MongoClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
lib/Mongo/MongoResultException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Mongo/Mongo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
      * @param bool $ok
102 102
      * @return bool returns the former value of slaveOkay for this instance.
103 103
      */
104
-    public function setSlaveOkay ($ok)
104
+    public function setSlaveOkay($ok)
105 105
     {
106 106
         $this->notImplemented();
107 107
     }
Please login to merge, or discard this patch.
lib/Alcaeus/MongoDbAdapter/Helper/WriteConcern.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     protected function setWriteConcernFromParameters($wstring, $wtimeout = 0)
57 57
     {
58
-        if (! is_string($wstring) && ! is_int($wstring)) {
58
+        if ( ! is_string($wstring) && ! is_int($wstring)) {
59 59
             trigger_error("w for WriteConcern must be a string or integer", E_WARNING);
60 60
             return false;
61 61
         }
Please login to merge, or discard this patch.
lib/Mongo/MongoCursor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@
 block discarded – undo
380 380
      */
381 381
     protected function convertCursorType()
382 382
     {
383
-        if (! $this->tailable) {
383
+        if ( ! $this->tailable) {
384 384
             return null;
385 385
         }
386 386
 
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.
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/MongoDB.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         $collections = $this->db->listCollections($options);
134 134
 
135
-        $getCollectionInfo = function (CollectionInfo $collectionInfo) {
135
+        $getCollectionInfo = function(CollectionInfo $collectionInfo) {
136 136
             return [
137 137
                 'name' => $collectionInfo->getName(),
138 138
                 'options' => $collectionInfo->getOptions(),
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         $collections = $this->db->listCollections($options);
160 160
 
161
-        $getCollectionName = function (CollectionInfo $collectionInfo) {
161
+        $getCollectionName = function(CollectionInfo $collectionInfo) {
162 162
             return $collectionInfo->getName();
163 163
         };
164 164
 
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
         if ($document_or_id instanceof \MongoId) {
308 308
             $id = $document_or_id;
309 309
         } elseif (is_object($document_or_id)) {
310
-            if (! isset($document_or_id->_id)) {
310
+            if ( ! isset($document_or_id->_id)) {
311 311
                 return null;
312 312
             }
313 313
 
314 314
             $id = $document_or_id->_id;
315 315
         } elseif (is_array($document_or_id)) {
316
-            if (! isset($document_or_id['_id'])) {
316
+            if ( ! isset($document_or_id['_id'])) {
317 317
                 return null;
318 318
             }
319 319
 
Please login to merge, or discard this patch.
lib/Mongo/MongoCollection.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function aggregate(array $pipeline, array $op = [])
127 127
     {
128
-        if (! TypeConverter::isNumericArray($pipeline)) {
128
+        if ( ! TypeConverter::isNumericArray($pipeline)) {
129 129
             $pipeline = [];
130 130
             $options = [];
131 131
 
132 132
             $i = 0;
133 133
             foreach (func_get_args() as $operator) {
134 134
                 $i++;
135
-                if (! is_array($operator)) {
135
+                if ( ! is_array($operator)) {
136 136
                     trigger_error("Argument $i is not an array", E_WARNING);
137 137
                     return;
138 138
                 }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         ];
171 171
 
172 172
         // Convert cursor option
173
-        if (! isset($options['cursor'])) {
173
+        if ( ! isset($options['cursor'])) {
174 174
             $options['cursor'] = true;
175 175
         }
176 176
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             $this->convertWriteConcernOptions($options)
262 262
         );
263 263
 
264
-        if (! $result->isAcknowledged()) {
264
+        if ( ! $result->isAcknowledged()) {
265 265
             return true;
266 266
         }
267 267
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             $this->convertWriteConcernOptions($options)
290 290
         );
291 291
 
292
-        if (! $result->isAcknowledged()) {
292
+        if ( ! $result->isAcknowledged()) {
293 293
             return true;
294 294
         }
295 295
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      * @throws MongoCursorException
314 314
      * @return boolean
315 315
      */
316
-    public function update(array $criteria , array $newobj, array $options = [])
316
+    public function update(array $criteria, array $newobj, array $options = [])
317 317
     {
318 318
         $multiple = isset($options['multiple']) ? $options['multiple'] : false;
319 319
         $method = $multiple ? 'updateMany' : 'updateOne';
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
             $this->convertWriteConcernOptions($options)
327 327
         );
328 328
 
329
-        if (! $result->isAcknowledged()) {
329
+        if ( ! $result->isAcknowledged()) {
330 330
             return true;
331 331
         }
332 332
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
      */
354 354
     public function remove(array $criteria = [], array $options = [])
355 355
     {
356
-        $multiple = isset($options['justOne']) ? !$options['justOne'] : true;
356
+        $multiple = isset($options['justOne']) ? ! $options['justOne'] : true;
357 357
         $method = $multiple ? 'deleteMany' : 'deleteOne';
358 358
 
359 359
         /** @var \MongoDB\DeleteResult $result */
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
             $this->convertWriteConcernOptions($options)
363 363
         );
364 364
 
365
-        if (! $result->isAcknowledged()) {
365
+        if ( ! $result->isAcknowledged()) {
366 366
             return true;
367 367
         }
368 368
 
@@ -605,13 +605,13 @@  discard block
 block discarded – undo
605 605
         if ($document_or_id instanceof \MongoId) {
606 606
             $id = $document_or_id;
607 607
         } elseif (is_object($document_or_id)) {
608
-            if (! isset($document_or_id->_id)) {
608
+            if ( ! isset($document_or_id->_id)) {
609 609
                 return null;
610 610
             }
611 611
 
612 612
             $id = $document_or_id->_id;
613 613
         } elseif (is_array($document_or_id)) {
614
-            if (! isset($document_or_id['_id'])) {
614
+            if ( ! isset($document_or_id['_id'])) {
615 615
                 return null;
616 616
             }
617 617
 
@@ -654,14 +654,14 @@  discard block
 block discarded – undo
654 654
         $command = [
655 655
             'group' => [
656 656
                 'ns' => $this->name,
657
-                '$reduce' => (string)$reduce,
657
+                '$reduce' => (string) $reduce,
658 658
                 'initial' => $initial,
659 659
                 'cond' => $condition,
660 660
             ],
661 661
         ];
662 662
 
663 663
         if ($keys instanceof MongoCode) {
664
-            $command['group']['$keyf'] = (string)$keys;
664
+            $command['group']['$keyf'] = (string) $keys;
665 665
         } else {
666 666
             $command['group']['key'] = $keys;
667 667
         }
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
         }
671 671
         if (array_key_exists('finalize', $condition)) {
672 672
             if ($condition['finalize'] instanceof MongoCode) {
673
-                $condition['finalize'] = (string)$condition['finalize'];
673
+                $condition['finalize'] = (string) $condition['finalize'];
674 674
             }
675 675
             $command['group']['finalize'] = $condition['finalize'];
676 676
         }
@@ -724,11 +724,11 @@  discard block
 block discarded – undo
724 724
             $options['w'] = ($options['safe']) ? 1 : 0;
725 725
         }
726 726
 
727
-        if (isset($options['wtimeout']) && !isset($options['wTimeoutMS'])) {
727
+        if (isset($options['wtimeout']) && ! isset($options['wTimeoutMS'])) {
728 728
             $options['wTimeoutMS'] = $options['wtimeout'];
729 729
         }
730 730
 
731
-        if (isset($options['w']) || !isset($options['wTimeoutMS'])) {
731
+        if (isset($options['w']) || ! isset($options['wTimeoutMS'])) {
732 732
             $collectionWriteConcern = $this->getWriteConcern();
733 733
             $writeConcern = $this->createWriteConcernFromParameters(
734 734
                 isset($options['w']) ? $options['w'] : $collectionWriteConcern['w'],
Please login to merge, or discard this patch.