@@ -93,7 +93,7 @@ public function __toString()
9393 * @param array $options Command options
9494 * @return Traversable
9595 */
96- public function aggregate (array $ pipeline , array $ options = array () )
96+ public function aggregate (array $ pipeline , array $ options = [] )
9797 {
9898 if ( ! isset ($ options ['readPreference ' ])) {
9999 $ options ['readPreference ' ] = $ this ->readPreference ;
@@ -117,7 +117,7 @@ public function aggregate(array $pipeline, array $options = array())
117117 * @param array $options Command options
118118 * @return BulkWriteResult
119119 */
120- public function bulkWrite (array $ operations , array $ options = array () )
120+ public function bulkWrite (array $ operations , array $ options = [] )
121121 {
122122 if ( ! isset ($ options ['writeConcern ' ])) {
123123 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -137,7 +137,7 @@ public function bulkWrite(array $operations, array $options = array())
137137 * @param array $options Command options
138138 * @return integer
139139 */
140- public function count ($ filter = array () , array $ options = array () )
140+ public function count ($ filter = [] , array $ options = [] )
141141 {
142142 if ( ! isset ($ options ['readPreference ' ])) {
143143 $ options ['readPreference ' ] = $ this ->readPreference ;
@@ -158,9 +158,9 @@ public function count($filter = array(), array $options = array())
158158 * @param array $options Index options
159159 * @return string The name of the created index
160160 */
161- public function createIndex ($ key , array $ options = array () )
161+ public function createIndex ($ key , array $ options = [] )
162162 {
163- return current ($ this ->createIndexes (array ( array ( 'key ' => $ key) + $ options) ));
163+ return current ($ this ->createIndexes ([[ 'key ' => $ key] + $ options] ));
164164 }
165165
166166 /**
@@ -203,7 +203,7 @@ public function createIndexes(array $indexes)
203203 * @param array $options Command options
204204 * @return DeleteResult
205205 */
206- public function deleteMany ($ filter , array $ options = array () )
206+ public function deleteMany ($ filter , array $ options = [] )
207207 {
208208 if ( ! isset ($ options ['writeConcern ' ])) {
209209 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -224,7 +224,7 @@ public function deleteMany($filter, array $options = array())
224224 * @param array $options Command options
225225 * @return DeleteResult
226226 */
227- public function deleteOne ($ filter , array $ options = array () )
227+ public function deleteOne ($ filter , array $ options = [] )
228228 {
229229 if ( ! isset ($ options ['writeConcern ' ])) {
230230 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -245,7 +245,7 @@ public function deleteOne($filter, array $options = array())
245245 * @param array $options Command options
246246 * @return mixed[]
247247 */
248- public function distinct ($ fieldName , $ filter = array () , array $ options = array () )
248+ public function distinct ($ fieldName , $ filter = [] , array $ options = [] )
249249 {
250250 if ( ! isset ($ options ['readPreference ' ])) {
251251 $ options ['readPreference ' ] = $ this ->readPreference ;
@@ -313,7 +313,7 @@ public function dropIndexes()
313313 * @param array $options Additional options
314314 * @return Cursor
315315 */
316- public function find ($ filter = array () , array $ options = array () )
316+ public function find ($ filter = [] , array $ options = [] )
317317 {
318318 if ( ! isset ($ options ['readPreference ' ])) {
319319 $ options ['readPreference ' ] = $ this ->readPreference ;
@@ -334,7 +334,7 @@ public function find($filter = array(), array $options = array())
334334 * @param array $options Additional options
335335 * @return object|null
336336 */
337- public function findOne ($ filter = array () , array $ options = array () )
337+ public function findOne ($ filter = [] , array $ options = [] )
338338 {
339339 if ( ! isset ($ options ['readPreference ' ])) {
340340 $ options ['readPreference ' ] = $ this ->readPreference ;
@@ -357,7 +357,7 @@ public function findOne($filter = array(), array $options = array())
357357 * @param array $options Command options
358358 * @return object|null
359359 */
360- public function findOneAndDelete ($ filter , array $ options = array () )
360+ public function findOneAndDelete ($ filter , array $ options = [] )
361361 {
362362 $ operation = new FindOneAndDelete ($ this ->databaseName , $ this ->collectionName , $ filter , $ options );
363363 $ server = $ this ->manager ->selectServer (new ReadPreference (ReadPreference::RP_PRIMARY ));
@@ -380,7 +380,7 @@ public function findOneAndDelete($filter, array $options = array())
380380 * @param array $options Command options
381381 * @return object|null
382382 */
383- public function findOneAndReplace ($ filter , $ replacement , array $ options = array () )
383+ public function findOneAndReplace ($ filter , $ replacement , array $ options = [] )
384384 {
385385 $ operation = new FindOneAndReplace ($ this ->databaseName , $ this ->collectionName , $ filter , $ replacement , $ options );
386386 $ server = $ this ->manager ->selectServer (new ReadPreference (ReadPreference::RP_PRIMARY ));
@@ -403,7 +403,7 @@ public function findOneAndReplace($filter, $replacement, array $options = array(
403403 * @param array $options Command options
404404 * @return object|null
405405 */
406- public function findOneAndUpdate ($ filter , $ update , array $ options = array () )
406+ public function findOneAndUpdate ($ filter , $ update , array $ options = [] )
407407 {
408408 $ operation = new FindOneAndUpdate ($ this ->databaseName , $ this ->collectionName , $ filter , $ update , $ options );
409409 $ server = $ this ->manager ->selectServer (new ReadPreference (ReadPreference::RP_PRIMARY ));
@@ -451,7 +451,7 @@ public function getNamespace()
451451 * @param array $options Command options
452452 * @return InsertManyResult
453453 */
454- public function insertMany (array $ documents , array $ options = array () )
454+ public function insertMany (array $ documents , array $ options = [] )
455455 {
456456 if ( ! isset ($ options ['writeConcern ' ])) {
457457 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -472,7 +472,7 @@ public function insertMany(array $documents, array $options = array())
472472 * @param array $options Command options
473473 * @return InsertOneResult
474474 */
475- public function insertOne ($ document , array $ options = array () )
475+ public function insertOne ($ document , array $ options = [] )
476476 {
477477 if ( ! isset ($ options ['writeConcern ' ])) {
478478 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -490,7 +490,7 @@ public function insertOne($document, array $options = array())
490490 * @see ListIndexes::__construct() for supported options
491491 * @return IndexInfoIterator
492492 */
493- public function listIndexes (array $ options = array () )
493+ public function listIndexes (array $ options = [] )
494494 {
495495 $ operation = new ListIndexes ($ this ->databaseName , $ this ->collectionName , $ options );
496496 $ server = $ this ->manager ->selectServer (new ReadPreference (ReadPreference::RP_PRIMARY ));
@@ -508,7 +508,7 @@ public function listIndexes(array $options = array())
508508 * @param array $options Command options
509509 * @return UpdateResult
510510 */
511- public function replaceOne ($ filter , $ replacement , array $ options = array () )
511+ public function replaceOne ($ filter , $ replacement , array $ options = [] )
512512 {
513513 if ( ! isset ($ options ['writeConcern ' ])) {
514514 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -530,7 +530,7 @@ public function replaceOne($filter, $replacement, array $options = array())
530530 * @param array $options Command options
531531 * @return UpdateResult
532532 */
533- public function updateMany ($ filter , $ update , array $ options = array () )
533+ public function updateMany ($ filter , $ update , array $ options = [] )
534534 {
535535 if ( ! isset ($ options ['writeConcern ' ])) {
536536 $ options ['writeConcern ' ] = $ this ->writeConcern ;
@@ -552,7 +552,7 @@ public function updateMany($filter, $update, array $options = array())
552552 * @param array $options Command options
553553 * @return UpdateResult
554554 */
555- public function updateOne ($ filter , $ update , array $ options = array () )
555+ public function updateOne ($ filter , $ update , array $ options = [] )
556556 {
557557 if ( ! isset ($ options ['writeConcern ' ])) {
558558 $ options ['writeConcern ' ] = $ this ->writeConcern ;
0 commit comments