From 3a696d257d209492e14d5aafe2c5e9114f3b8833 Mon Sep 17 00:00:00 2001 From: Franco Fichtner <franco@opnsense.org> Date: Tue, 19 Nov 2024 08:11:36 +0100 Subject: [PATCH] src: style --- .../mvc/app/library/OPNsense/Auth/LDAP.php | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php index b00f57468cd..e20e41d9d76 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php +++ b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php @@ -260,21 +260,22 @@ public function __construct($baseSearchDN = null, $ldapVersion = 3) */ public function setProperties($config) { - $confMap = array("ldap_protver" => "ldapVersion", - "ldap_basedn" => "baseSearchDN", - "ldap_binddn" => "ldapBindDN", - "ldap_bindpw" => "ldapBindPassword", - "ldap_attr_user" => "ldapAttributeUser", - "ldap_extended_query" => "ldapExtendedQuery", - "ldap_authcn" => "ldapAuthcontainers", - "ldap_scope" => "ldapScope", - "local_users" => "userDNmap", - "ldap_read_properties" => "ldapReadProperties", - "ldap_sync_memberof" => "ldapSyncMemberOf", - "ldap_sync_memberof_constraint" => "ldapSyncMemberOfConstraint", - "ldap_sync_memberof_groups" => "ldapSyncMemberOfLimit", - "ldap_sync_default_groups" => "ldapSyncDefaultGroups" - ); + $confMap = [ + 'ldap_protver' => 'ldapVersion', + 'ldap_basedn' => 'baseSearchDN', + 'ldap_binddn' => 'ldapBindDN', + 'ldap_bindpw' => 'ldapBindPassword', + 'ldap_attr_user' => 'ldapAttributeUser', + 'ldap_extended_query' => 'ldapExtendedQuery', + 'ldap_authcn' => 'ldapAuthcontainers', + 'ldap_scope' => 'ldapScope', + 'local_users' => 'userDNmap', + 'ldap_read_properties' => 'ldapReadProperties', + 'ldap_sync_memberof' => 'ldapSyncMemberOf', + 'ldap_sync_memberof_constraint' => 'ldapSyncMemberOfConstraint', + 'ldap_sync_memberof_groups' => 'ldapSyncMemberOfLimit', + 'ldap_sync_default_groups' => 'ldapSyncDefaultGroups', + ]; // map properties 1-on-1 foreach ($confMap as $confSetting => $objectProperty) {