Completed
Pull Request — master (#159)
by
unknown
04:33
created
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/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/MongoLog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
      * <ul>
120 120
      * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
121 121
      */
122
-    public static function setCallback(callable $log_function )
122
+    public static function setCallback(callable $log_function)
123 123
     {
124 124
         self::$callback = $log_function;
125 125
         return true;
Please login to merge, or discard this patch.
lib/Mongo/MongoGridFSCursor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,6 +65,6 @@
 block discarded – undo
65 65
     public function key()
66 66
     {
67 67
         $file = $this->current();
68
-        return ($file !== null) ? (string)$file->file['_id'] : null;
68
+        return ($file !== null) ? (string) $file->file['_id'] : null;
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
lib/Mongo/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 use Alcaeus\MongoDbAdapter\TypeConverter;
17 17
 
18
-if (! function_exists('bson_decode')) {
18
+if ( ! function_exists('bson_decode')) {
19 19
     /**
20 20
      * Deserializes a BSON object into a PHP array
21 21
      *
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 }
30 30
 
31
-if (! function_exists('bson_encode')) {
31
+if ( ! function_exists('bson_encode')) {
32 32
     /**
33 33
      * Serializes a PHP variable into a BSON string
34 34
      *
Please login to merge, or discard this patch.
lib/Mongo/MongoClient.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
     use Helper\WriteConcern;
29 29
 
30 30
     const VERSION = '1.6.12';
31
-    const DEFAULT_HOST = "localhost" ;
32
-    const DEFAULT_PORT = 27017 ;
33
-    const RP_PRIMARY = "primary" ;
34
-    const RP_PRIMARY_PREFERRED = "primaryPreferred" ;
35
-    const RP_SECONDARY = "secondary" ;
36
-    const RP_SECONDARY_PREFERRED = "secondaryPreferred" ;
37
-    const RP_NEAREST = "nearest" ;
31
+    const DEFAULT_HOST = "localhost";
32
+    const DEFAULT_PORT = 27017;
33
+    const RP_PRIMARY = "primary";
34
+    const RP_PRIMARY_PREFERRED = "primaryPreferred";
35
+    const RP_SECONDARY = "secondary";
36
+    const RP_SECONDARY_PREFERRED = "secondaryPreferred";
37
+    const RP_NEAREST = "nearest";
38 38
 
39 39
     /**
40 40
      * @var bool
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $this->server = $server;
86 86
         if (false === strpos($this->server, 'mongodb://')) {
87
-            $this->server = 'mongodb://'.$this->server;
87
+            $this->server = 'mongodb://' . $this->server;
88 88
         }
89 89
         $this->client = new Client($this->server, $options, $driverOptions);
90 90
         $info = $this->client->__debugInfo();
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      * @param int|MongoInt64 $id The ID of the cursor to kill.
231 231
      * @return bool
232 232
      */
233
-    public function killCursor($server_hash , $id)
233
+    public function killCursor($server_hash, $id)
234 234
     {
235 235
         $this->notImplemented();
236 236
     }
Please login to merge, or discard this patch.
lib/Mongo/MongoDB.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             throw ExceptionConverter::toLegacy($e);
139 139
         }
140 140
 
141
-        $getCollectionInfo = function (CollectionInfo $collectionInfo) {
141
+        $getCollectionInfo = function(CollectionInfo $collectionInfo) {
142 142
             return [
143 143
                 'name' => $collectionInfo->getName(),
144 144
                 'options' => $collectionInfo->getOptions(),
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             throw ExceptionConverter::toLegacy($e);
176 176
         }
177 177
 
178
-        $getCollectionName = function (CollectionInfo $collectionInfo) {
178
+        $getCollectionName = function(CollectionInfo $collectionInfo) {
179 179
             return $collectionInfo->getName();
180 180
         };
181 181
 
@@ -344,13 +344,13 @@  discard block
 block discarded – undo
344 344
         if ($document_or_id instanceof \MongoId) {
345 345
             $id = $document_or_id;
346 346
         } elseif (is_object($document_or_id)) {
347
-            if (! isset($document_or_id->_id)) {
347
+            if ( ! isset($document_or_id->_id)) {
348 348
                 $id = $document_or_id;
349 349
             } else {
350 350
                 $id = $document_or_id->_id;
351 351
             }
352 352
         } elseif (is_array($document_or_id)) {
353
-            if (! isset($document_or_id['_id'])) {
353
+            if ( ! isset($document_or_id['_id'])) {
354 354
                 return null;
355 355
             }
356 356
 
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
      * @return Closure
542 542
      */
543 543
     private function getSystemCollectionFilterClosure($includeSystemCollections = false) {
544
-        return function (CollectionInfo $collectionInfo) use ($includeSystemCollections) {
544
+        return function(CollectionInfo $collectionInfo) use ($includeSystemCollections) {
545 545
             return $includeSystemCollections || ! preg_match('#^system\.#', $collectionInfo->getName());
546 546
         };
547 547
     }
Please login to merge, or discard this patch.