* @file
*/
+use Wikimedia\Rdbms\IDatabase;
+
/**
* Represents a "user group membership" -- a specific instance of a user belonging
* to a group. For example, the fact that user Mary belongs to the sysop group is a
* @param IDatabase|null $db Optional database connection
* @return array Associative array of (group name => UserGroupMembership object)
*/
- public static function getMembershipsForUser( $userId, $db = null ) {
+ public static function getMembershipsForUser( $userId, IDatabase $db = null ) {
if ( !$db ) {
$db = wfGetDB( DB_REPLICA );
}