@@ -1018,6 +1018,9 @@ discard block |
||
1018 | 1018 | return null; |
1019 | 1019 | } |
1020 | 1020 | |
1021 | + /** |
|
1022 | + * @param string $name |
|
1023 | + */ |
|
1021 | 1024 | private function checkCollectionName($name) |
1022 | 1025 | { |
1023 | 1026 | if (empty($name)) { |
@@ -1028,7 +1031,7 @@ discard block |
||
1028 | 1031 | } |
1029 | 1032 | |
1030 | 1033 | /** |
1031 | - * @return array |
|
1034 | + * @return string[] |
|
1032 | 1035 | */ |
1033 | 1036 | public function __sleep() |
1034 | 1037 | { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * Returns the address being used by this for slaveOkay reads |
53 | 53 | * |
54 | 54 | * @link http://php.net/manual/en/mongo.getslave.php |
55 | - * @return bool The address of the secondary this connection is using for |
|
55 | + * @return boolean|null The address of the secondary this connection is using for |
|
56 | 56 | * reads. This returns NULL if this is not connected to a replica set or not yet |
57 | 57 | * initialized. |
58 | 58 | */ |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * Get slaveOkay setting for this connection |
66 | 66 | * |
67 | 67 | * @link http://php.net/manual/en/mongo.getslaveokay.php |
68 | - * @return bool Returns the value of slaveOkay for this instance. |
|
68 | + * @return boolean|null Returns the value of slaveOkay for this instance. |
|
69 | 69 | */ |
70 | 70 | public function getSlaveOkay() |
71 | 71 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @link http://www.php.net/manual/en/mongo.pairconnect.php |
79 | 79 | * @throws MongoConnectionException |
80 | - * @return boolean |
|
80 | + * @return boolean|null |
|
81 | 81 | * |
82 | 82 | * @deprecated Pass a string of the form "mongodb://server1,server2" to the constructor instead of using this method. |
83 | 83 | */ |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @link http://php.net/manual/en/mongo.setslaveokay.php |
105 | 105 | * @param bool $ok |
106 | - * @return bool returns the former value of slaveOkay for this instance. |
|
106 | + * @return boolean|null returns the former value of slaveOkay for this instance. |
|
107 | 107 | */ |
108 | 108 | public function setSlaveOkay($ok) |
109 | 109 | { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * |
116 | 116 | * @link http://php.net/manual/en/mongo.setpoolsize.php |
117 | 117 | * @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> |
118 | - * @return bool Returns the former value of pool size. |
|
118 | + * @return boolean|null Returns the former value of pool size. |
|
119 | 119 | * @deprecated Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead. |
120 | 120 | */ |
121 | 121 | public function setPoolSize($size) |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @param string $username A username used to identify the connection. |
131 | 131 | * @param string $password A password used to identify the connection. |
132 | 132 | * @throws MongoConnectionException |
133 | - * @return boolean If the connection was successful. |
|
133 | + * @return boolean|null If the connection was successful. |
|
134 | 134 | * @deprecated Pass array("persist" => $id) to the constructor instead of using this method. |
135 | 135 | */ |
136 | 136 | public function persistConnect($username = "", $password = "") |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @param string $username A username used to identify the connection. |
146 | 146 | * @param string $password A password used to identify the connection. |
147 | 147 | * @throws MongoConnectionException |
148 | - * @return boolean If the connection was successful. |
|
148 | + * @return boolean|null If the connection was successful. |
|
149 | 149 | * @deprecated Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method. |
150 | 150 | */ |
151 | 151 | public function pairPersistConnect($username = "", $password = "") |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * |
159 | 159 | * @link http://www.php.net/manual/en/mongo.connectutil.php |
160 | 160 | * @throws MongoConnectionException |
161 | - * @return boolean If the connection was successful. |
|
161 | + * @return boolean|null If the connection was successful. |
|
162 | 162 | */ |
163 | 163 | protected function connectUtil() |
164 | 164 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * Creates a database error on the database. |
218 | 218 | * |
219 | 219 | * @link http://www.php.net/manual/en/mongo.forceerror.php |
220 | - * @return boolean The database response. |
|
220 | + * @return boolean|null The database response. |
|
221 | 221 | * @deprecated Use MongoDB::forceError() instead. |
222 | 222 | */ |
223 | 223 | public function forceError() |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * @link http://www.php.net/manual/en/mongoclient.killcursor.php |
235 | 235 | * @param string $server_hash The server hash that has the cursor. |
236 | 236 | * @param int|MongoInt64 $id The ID of the cursor to kill. |
237 | - * @return bool |
|
237 | + * @return boolean|null |
|
238 | 238 | */ |
239 | 239 | public function killCursor($server_hash, $id) |
240 | 240 | { |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | } |
343 | 343 | |
344 | 344 | /** |
345 | - * @return array |
|
345 | + * @return string[] |
|
346 | 346 | */ |
347 | 347 | function __sleep() |
348 | 348 | { |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | } |
353 | 353 | |
354 | 354 | /** |
355 | - * @param $server |
|
355 | + * @param string $server |
|
356 | 356 | * @return array |
357 | 357 | */ |
358 | 358 | private function extractUrlOptions($server) |