Code Duplication    Length = 10-10 lines in 2 locations

apps/user_ldap/lib/Group_Proxy.php 1 location

@@ 37-46 (lines=10) @@
34
	 * Constructor
35
	 * @param string[] $serverConfigPrefixes array containing the config Prefixes
36
	 */
37
	public function __construct($serverConfigPrefixes, ILDAPWrapper $ldap) {
38
		parent::__construct($ldap);
39
		foreach($serverConfigPrefixes as $configPrefix) {
40
			$this->backends[$configPrefix] =
41
				new \OCA\User_LDAP\Group_LDAP($this->getAccess($configPrefix));
42
			if(is_null($this->refBackend)) {
43
				$this->refBackend = &$this->backends[$configPrefix];
44
			}
45
		}
46
	}
47
48
	/**
49
	 * Tries the backends one after the other until a positive result is returned from the specified method

apps/user_ldap/lib/User_Proxy.php 1 location

@@ 43-52 (lines=10) @@
40
	 * Constructor
41
	 * @param array $serverConfigPrefixes array containing the config Prefixes
42
	 */
43
	public function __construct(array $serverConfigPrefixes, ILDAPWrapper $ldap, IConfig $ocConfig) {
44
		parent::__construct($ldap);
45
		foreach($serverConfigPrefixes as $configPrefix) {
46
			$this->backends[$configPrefix] =
47
				new User_LDAP($this->getAccess($configPrefix), $ocConfig);
48
			if(is_null($this->refBackend)) {
49
				$this->refBackend = &$this->backends[$configPrefix];
50
			}
51
		}
52
	}
53
54
	/**
55
	 * Tries the backends one after the other until a positive result is returned from the specified method