Skip to content

Commit 1354a59

Browse files
committed
Alphabetize method declarations in Client
1 parent 4637f61 commit 1354a59

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Client.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,32 @@ public function dropDatabase($databaseName)
4242
}
4343

4444
/**
45-
* Select a database
45+
* Select a specific collection in a database
4646
*
47-
* It acts as a bridge to access specific database commands
47+
* It acts as a bridge to access specific collection commands
4848
*
49-
* @param string $databaseName The database to select
49+
* @param string $databaseName The database where the $collectionName exists
50+
* @param string $collectionName The collection to select
5051
* @param WriteConcern $writeConcern Default Write Concern to apply
5152
* @param ReadPreference $readPreferences Default Read Preferences to apply
5253
*/
53-
public function selectDatabase($databaseName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null)
54+
public function selectCollection($databaseName, $collectionName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null)
5455
{
55-
return new Database($this->manager, $databaseName, $writeConcern, $readPreferences);
56+
return new Collection($this->manager, "{$databaseName}.{$collectionName}", $writeConcern, $readPreferences);
5657
}
5758

5859
/**
59-
* Select a specific collection in a database
60+
* Select a database
6061
*
61-
* It acts as a bridge to access specific collection commands
62+
* It acts as a bridge to access specific database commands
6263
*
63-
* @param string $databaseName The database where the $collectionName exists
64-
* @param string $collectionName The collection to select
64+
* @param string $databaseName The database to select
6565
* @param WriteConcern $writeConcern Default Write Concern to apply
6666
* @param ReadPreference $readPreferences Default Read Preferences to apply
6767
*/
68-
public function selectCollection($databaseName, $collectionName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null)
68+
public function selectDatabase($databaseName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null)
6969
{
70-
return new Collection($this->manager, "{$databaseName}.{$collectionName}", $writeConcern, $readPreferences);
70+
return new Database($this->manager, $databaseName, $writeConcern, $readPreferences);
7171
}
7272

7373
}

0 commit comments

Comments
 (0)