Completed
Pull Request — master (#18)
by
unknown
24:10 queued 09:55
created
lib/Mongo/Mongo.php 2 patches
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * Returns the address being used by this for slaveOkay reads
49 49
      *
50 50
      * @link http://php.net/manual/en/mongo.getslave.php
51
-     * @return bool The address of the secondary this connection is using for
51
+     * @return boolean|null The address of the secondary this connection is using for
52 52
      * reads. This returns NULL if this is not connected to a replica set or not yet
53 53
      * initialized.
54 54
      */
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * Get slaveOkay setting for this connection
62 62
      *
63 63
      * @link http://php.net/manual/en/mongo.getslaveokay.php
64
-     * @return bool Returns the value of slaveOkay for this instance.
64
+     * @return boolean|null Returns the value of slaveOkay for this instance.
65 65
      */
66 66
     public function getSlaveOkay()
67 67
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @link http://www.php.net/manual/en/mongo.pairconnect.php
75 75
      * @throws MongoConnectionException
76
-     * @return boolean
76
+     * @return boolean|null
77 77
      *
78 78
      * @deprecated Pass a string of the form "mongodb://server1,server2" to the constructor instead of using this method.
79 79
      */
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @link http://php.net/manual/en/mongo.setslaveokay.php
101 101
      * @param bool $ok
102
-     * @return bool returns the former value of slaveOkay for this instance.
102
+     * @return boolean|null returns the former value of slaveOkay for this instance.
103 103
      */
104 104
     public function setSlaveOkay ($ok)
105 105
     {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @link http://php.net/manual/en/mongo.setpoolsize.php
113 113
      * @param $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p>
114
-     * @return bool Returns the former value of pool size.
114
+     * @return boolean|null Returns the former value of pool size.
115 115
      * @deprecated Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead.
116 116
      */
117 117
     public function setPoolSize($size)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param string $username A username used to identify the connection.
127 127
      * @param string $password A password used to identify the connection.
128 128
      * @throws MongoConnectionException
129
-     * @return boolean If the connection was successful.
129
+     * @return boolean|null If the connection was successful.
130 130
      * @deprecated Pass array("persist" => $id) to the constructor instead of using this method.
131 131
      */
132 132
     public function persistConnect($username = "", $password = "")
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @param string $username A username used to identify the connection.
142 142
      * @param string $password A password used to identify the connection.
143 143
      * @throws MongoConnectionException
144
-     * @return boolean If the connection was successful.
144
+     * @return boolean|null If the connection was successful.
145 145
      * @deprecated Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method.
146 146
      */
147 147
     public function pairPersistConnect($username = "", $password = "")
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      *
155 155
      * @link http://www.php.net/manual/en/mongo.connectutil.php
156 156
      * @throws MongoConnectionException
157
-     * @return boolean If the connection was successful.
157
+     * @return boolean|null If the connection was successful.
158 158
      */
159 159
     protected function connectUtil()
160 160
     {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      * Creates a database error on the database.
202 202
      *
203 203
      * @link http://www.php.net/manual/en/mongo.forceerror.php
204
-     * @return boolean The database response.
204
+     * @return boolean|null The database response.
205 205
      * @deprecated Use MongoDB::forceError() instead.
206 206
      */
207 207
     public function forceError()
Please login to merge, or discard this 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/MongoConnectionException.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 MongoConnectionException extends MongoException {
16
+class MongoConnectionException extends MongoException
17
+{
17 18
 
18 19
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoCursorException.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 MongoCursorException extends MongoException {
16
+class MongoCursorException extends MongoException
17
+{
17 18
 
18 19
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoCursorTimeoutException.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 MongoCursorTimeoutException extends MongoCursorException {
16
+class MongoCursorTimeoutException extends MongoCursorException
17
+{
17 18
 
18 19
 }
Please login to merge, or discard this patch.
lib/Mongo/MongoDB.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 
131 131
         $collections = $this->db->listCollections($options);
132 132
 
133
-        $getCollectionName = function (CollectionInfo $collectionInfo) {
133
+        $getCollectionName = function(CollectionInfo $collectionInfo) {
134 134
             return $collectionInfo->getName();
135 135
         };
136 136
 
137
-        return array_map($getCollectionName, (array)$collections);
137
+        return array_map($getCollectionName, (array) $collections);
138 138
     }
139 139
 
140 140
     /**
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
         if ($document_or_id instanceof \MongoId) {
280 280
             $id = $document_or_id;
281 281
         } elseif (is_object($document_or_id)) {
282
-            if (! isset($document_or_id->_id)) {
282
+            if ( ! isset($document_or_id->_id)) {
283 283
                 return null;
284 284
             }
285 285
 
286 286
             $id = $document_or_id->_id;
287 287
         } elseif (is_array($document_or_id)) {
288
-            if (! isset($document_or_id['_id'])) {
288
+            if ( ! isset($document_or_id['_id'])) {
289 289
                 return null;
290 290
             }
291 291
 
Please login to merge, or discard this patch.
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.
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.