@@ -207,7 +207,7 @@ |
||
207 | 207 | * Lists all of the databases available |
208 | 208 | * |
209 | 209 | * @link http://php.net/manual/en/mongoclient.listdbs.php |
210 | - * @return array Returns an associative array containing three fields. The first field is databases, which in turn contains an array. Each element of the array is an associative array corresponding to a database, giving the database's name, size, and if it's empty. The other two fields are totalSize (in bytes) and ok, which is 1 if this method ran successfully. |
|
210 | + * @return MongoDB\Model\DatabaseInfoLegacyIterator Returns an associative array containing three fields. The first field is databases, which in turn contains an array. Each element of the array is an associative array corresponding to a database, giving the database's name, size, and if it's empty. The other two fields are totalSize (in bytes) and ok, which is 1 if this method ran successfully. |
|
211 | 211 | */ |
212 | 212 | public function listDBs() |
213 | 213 | { |
@@ -23,13 +23,13 @@ discard block |
||
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 |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $results[$key] = [ |
196 | 196 | 'host' => $server->getHost(), |
197 | 197 | 'port' => $server->getPort(), |
198 | - 'health' => (int)$info['ok'], // Not totally sure about this |
|
198 | + 'health' => (int) $info['ok'], // Not totally sure about this |
|
199 | 199 | 'state' => $server->getType(), |
200 | 200 | 'ping' => $server->getLatency(), |
201 | 201 | 'lastPing' => null, |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * {@link http://www.php.net/manual/en/class.mongoint64.php MongoInt64} class. The latter is necessary on 32 |
236 | 236 | * bit platforms (and Windows). |
237 | 237 | */ |
238 | - public function killCursor($server_hash , $id) |
|
238 | + public function killCursor($server_hash, $id) |
|
239 | 239 | { |
240 | 240 | throw new \Exception('Not implemented'); |
241 | 241 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @link http://php.net/manual/en/mongogridfs.construct.php |
46 | 46 | * @param MongoDB $db Database |
47 | 47 | * @param string $prefix [optional] <p>Optional collection name prefix.</p> |
48 | - * @param mixed $chunks [optional] |
|
48 | + * @param string $chunks [optional] |
|
49 | 49 | * @return MongoGridFS |
50 | 50 | */ |
51 | 51 | public function __construct($db, $prefix = "fs", $chunks = "fs") {} |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * @param array $criteria Description of records to remove. |
101 | 101 | * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded. |
102 | 102 | * @throws MongoCursorException |
103 | - * @return boolean |
|
103 | + * @return boolean|null |
|
104 | 104 | */ |
105 | 105 | public function remove(array $criteria = array(), array $options = array()) {} |
106 | 106 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * Delete a file from the database |
109 | 109 | * @link http://php.net/manual/en/mongogridfs.delete.php |
110 | 110 | * @param mixed $id _id of the file to remove |
111 | - * @return boolean Returns true if the remove was successfully sent to the database. |
|
111 | + * @return boolean|null Returns true if the remove was successfully sent to the database. |
|
112 | 112 | */ |
113 | 113 | public function delete($id) {} |
114 | 114 |
@@ -200,7 +200,7 @@ |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
203 | - * @param $id |
|
203 | + * @param string|null $id |
|
204 | 204 | * @throws MongoException |
205 | 205 | */ |
206 | 206 | private function createObjectID($id) |
@@ -97,7 +97,7 @@ |
||
97 | 97 | * |
98 | 98 | * <p>The log message itself.</p></li> |
99 | 99 | * <ul> |
100 | - * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
100 | + * @return boolean|null Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
101 | 101 | */ |
102 | 102 | public static function setCallback ( callable $log_function ) {} |
103 | 103 |
@@ -99,7 +99,7 @@ |
||
99 | 99 | * <ul> |
100 | 100 | * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
101 | 101 | */ |
102 | - public static function setCallback ( callable $log_function ) {} |
|
102 | + public static function setCallback(callable $log_function) {} |
|
103 | 103 | |
104 | 104 | /** |
105 | 105 | * This function can be used to set how verbose logging should be and the types of |
@@ -50,7 +50,7 @@ |
||
50 | 50 | * @param int $size The max number of connections future pools will be able to |
51 | 51 | * create. Negative numbers mean that the pool will spawn an infinite number of |
52 | 52 | * connections |
53 | - * @return boolean Returns the former value of pool size |
|
53 | + * @return boolean|null Returns the former value of pool size |
|
54 | 54 | */ |
55 | 55 | public static function setSize($size) {} |
56 | 56 |
@@ -25,7 +25,7 @@ |
||
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 |
@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | use Alcaeus\MongoDbAdapter\TypeInterface; |
17 | 17 | use MongoDB\BSON\Binary; |
18 | -use MongoDB\BSON\Type; |
|
19 | 18 | |
20 | 19 | class MongoBinData implements TypeInterface |
21 | 20 | { |
@@ -43,7 +43,7 @@ |
||
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 |
@@ -77,7 +77,7 @@ |
||
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 |