From f04aa1af5d53759dfc838057a5289106489c4a25 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 6 Sep 2013 20:52:26 +0200 Subject: [PATCH] LDAP: don't check var type when you can specify the type in the parameter list --- apps/user_ldap/lib/backendbase.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 -- 2.39.5