diff options
Diffstat (limited to 'apps/user_ldap/lib/Connection.php')
-rw-r--r-- | apps/user_ldap/lib/Connection.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 8d499a4ee1c..5e2d7fb8583 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -298,7 +298,7 @@ class Connection extends LDAPUtility { */ public function setConfiguration($config, &$setParameters = null) { if(is_null($setParameters)) { - $setParameters = array(); + $setParameters = []; } $this->doNotValidate = false; $this->configuration->setConfiguration($config, $setParameters); @@ -328,7 +328,7 @@ class Connection extends LDAPUtility { $this->readConfiguration(); $config = $this->configuration->getConfiguration(); $cta = $this->configuration->getConfigTranslationArray(); - $result = array(); + $result = []; foreach($cta as $dbkey => $configkey) { switch($configkey) { case 'homeFolderNamingRule': @@ -356,15 +356,15 @@ class Connection extends LDAPUtility { private function doSoftValidation() { //if User or Group Base are not set, take over Base DN setting - foreach(array('ldapBaseUsers', 'ldapBaseGroups') as $keyBase) { + foreach(['ldapBaseUsers', 'ldapBaseGroups'] as $keyBase) { $val = $this->configuration->$keyBase; if(empty($val)) { $this->configuration->$keyBase = $this->configuration->ldapBase; } } - foreach(array('ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute', - 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute') + foreach(['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute', + 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] as $expertSetting => $effectiveSetting) { $uuidOverride = $this->configuration->$expertSetting; if(!empty($uuidOverride)) { @@ -392,12 +392,12 @@ class Connection extends LDAPUtility { } //make sure empty search attributes are saved as simple, empty array - $saKeys = array('ldapAttributesForUserSearch', - 'ldapAttributesForGroupSearch'); + $saKeys = ['ldapAttributesForUserSearch', + 'ldapAttributesForGroupSearch']; foreach($saKeys as $key) { $val = $this->configuration->$key; if(is_array($val) && count($val) === 1 && empty($val[0])) { - $this->configuration->$key = array(); + $this->configuration->$key = []; } } @@ -421,8 +421,8 @@ class Connection extends LDAPUtility { (string)$this->configPrefix .'): '; //options that shall not be empty - $options = array('ldapHost', 'ldapPort', 'ldapUserDisplayName', - 'ldapGroupDisplayName', 'ldapLoginFilter'); + $options = ['ldapHost', 'ldapPort', 'ldapUserDisplayName', + 'ldapGroupDisplayName', 'ldapLoginFilter']; foreach($options as $key) { $val = $this->configuration->$key; if(empty($val)) { |