From: Arthur Schiwon Date: Fri, 6 Sep 2013 18:52:26 +0000 (+0200) Subject: LDAP: don't check var type when you can specify the type in the parameter list X-Git-Tag: v6.0.0alpha2~103^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f04aa1af5d53759dfc838057a5289106489c4a25;p=nextcloud-server.git LDAP: don't check var type when you can specify the type in the parameter list --- diff --git a/apps/user_ldap/lib/backendbase.php b/apps/user_ldap/lib/backendbase.php index 7ed079b3418..5ed73a0a5b1 100644 --- a/apps/user_ldap/lib/backendbase.php +++ b/apps/user_ldap/lib/backendbase.php @@ -39,12 +39,8 @@ abstract class BackendBase { * The LDAP Wrapper must implement the PHP LDAP functions, which are used * in the LDAP backend */ - public function setLDAPWrapper($ldapWrapper) { - if(is_object($ldapWrapper)) { - unset($this->ldap); - $this->ldap = $ldapWrapper; - return true; - } - return false; + public function setLDAPWrapper(ILDAPWrapper $ldapWrapper) { + $this->ldap = $ldapWrapper; + return true; } } \ No newline at end of file