Code Duplication    Length = 9-9 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 2 locations

@@ 1137-1145 (lines=9) @@
1134
	 * @return bool
1135
	 * @throws \Exception
1136
	 */
1137
	public function addToGroup($uid, $gid) {
1138
		if ($this->groupPluginManager->implementsActions(GroupInterface::ADD_TO_GROUP)) {
1139
			if ($ret = $this->groupPluginManager->addToGroup($uid, $gid)) {
1140
				$this->access->connection->clearCache();
1141
			}
1142
			return $ret;
1143
		}
1144
		throw new \Exception('Could not add user to group in LDAP backend.');
1145
	}
1146
1147
	/**
1148
	 * Removes a user from a group
@@ 1154-1162 (lines=9) @@
1151
	 * @return bool
1152
	 * @throws \Exception
1153
	 */
1154
	public function removeFromGroup($uid, $gid) {
1155
		if ($this->groupPluginManager->implementsActions(GroupInterface::REMOVE_FROM_GROUP)) {
1156
			if ($ret = $this->groupPluginManager->removeFromGroup($uid, $gid)) {
1157
				$this->access->connection->clearCache();
1158
			}
1159
			return $ret;
1160
		}
1161
		throw new \Exception('Could not remove user from group in LDAP backend.');
1162
	}
1163
1164
	/**
1165
	 * Gets group details