Completed
Pull Request — master (#108)
by Damien
03:20
created
lib/Mongo/MongoDB.php 4 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@
 block discarded – undo
204 204
      * @param bool $backup_original_files [optional] <p>If original files should be backed up.</p>
205 205
      * @return array <p>Returns db response.</p>
206 206
      */
207
-    public function repair($preserve_cloned_files = FALSE, $backup_original_files = FALSE)
207
+    public function repair($preserve_cloned_files = false, $backup_original_files = false)
208 208
     {
209 209
         return [];
210 210
     }
Please login to merge, or discard this 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.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -540,7 +540,8 @@
 block discarded – undo
540 540
      * @param bool $includeSystemCollections
541 541
      * @return Closure
542 542
      */
543
-    private function getSystemCollectionFilterClosure($includeSystemCollections = false) {
543
+    private function getSystemCollectionFilterClosure($includeSystemCollections = false)
544
+    {
544 545
         return function (CollectionInfo $collectionInfo) use ($includeSystemCollections) {
545 546
             return $includeSystemCollections || ! preg_match('#^system\.#', $collectionInfo->getName());
546 547
         };
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -511,6 +511,9 @@  discard block
 block discarded – undo
511 511
         }
512 512
     }
513 513
 
514
+    /**
515
+     * @param string $name
516
+     */
514 517
     private function checkDatabaseName($name)
515 518
     {
516 519
         if (empty($name)) {
@@ -543,7 +546,7 @@  discard block
 block discarded – undo
543 546
     }
544 547
 
545 548
     /**
546
-     * @return array
549
+     * @return string[]
547 550
      */
548 551
     public function __sleep()
549 552
     {
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/MongoDuplicateKeyException.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,7 @@
 block discarded – undo
17 17
  * <p>(PECL mongo &gt;= 1.5.0)</p>
18 18
  * @link http://php.net/manual/en/class.mongoduplicatekeyexception.php
19 19
  */
20
-class MongoDuplicateKeyException extends MongoWriteConcernException {
20
+class MongoDuplicateKeyException extends MongoWriteConcernException
21
+{
21 22
 
22 23
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoException.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,6 @@
 block discarded – undo
13 13
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 14
  */
15 15
 
16
-class MongoException extends Exception {
16
+class MongoException extends Exception
17
+{
17 18
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoExecutionTimeoutException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,4 +17,6 @@
 block discarded – undo
17 17
  * <p>(PECL mongo &gt;= 1.5.0)</p>
18 18
  * @link http://php.net/manual/en/class.mongoexecutiontimeoutexception.php
19 19
  */
20
-class MongoExecutionTimeoutException extends MongoException {}
20
+class MongoExecutionTimeoutException extends MongoException
21
+{
22
+}
Please login to merge, or discard this patch.
lib/Mongo/MongoGridFSException.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,7 @@
 block discarded – undo
13 13
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 14
  */
15 15
 
16
-class MongoGridFSException extends MongoException {
16
+class MongoGridFSException extends MongoException
17
+{
17 18
 
18 19
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoProtocolException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,4 +16,6 @@
 block discarded – undo
16 16
 /**
17 17
  * <p>(PECL mongo &gt;= 1.5.0)</p>
18 18
  */
19
-class MongoProtocolException extends MongoException {}
19
+class MongoProtocolException extends MongoException
20
+{
21
+}
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/MongoWriteConcernException.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,14 @@
 block discarded – undo
17 17
  * <p>(PECL mongo &gt;= 1.5.0)</p>
18 18
  * @link http://php.net/manual/en/class.mongowriteconcernexception.php#class.mongowriteconcernexception
19 19
  */
20
-class MongoWriteConcernException extends MongoCursorException {
20
+class MongoWriteConcernException extends MongoCursorException
21
+{
21 22
     /**
22 23
      * Get the error document
23 24
      * @link http://php.net/manual/en/mongowriteconcernexception.getdocument.php
24 25
      * @return array <p>A MongoDB document, if available, as an array.</p>
25 26
      */
26
-    public function getDocument() {}
27
+    public function getDocument()
28
+    {
29
+}
27 30
 }
Please login to merge, or discard this patch.