@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | return array_values(array_filter( |
54 | 54 | $all, |
55 | - fn (string $prefix): bool => ($this->appConfig->getValueString('user_ldap', $prefix . 'ldap_configuration_active') === '1') |
|
55 | + fn (string $prefix): bool => ($this->appConfig->getValueString('user_ldap', $prefix.'ldap_configuration_active') === '1') |
|
56 | 56 | )); |
57 | 57 | } |
58 | 58 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $referenceConfigkey = 'ldap_host'; |
94 | 94 | $result = []; |
95 | 95 | foreach ($prefixes as $prefix) { |
96 | - $result[$prefix] = $this->appConfig->getValueString('user_ldap', $prefix . $referenceConfigkey); |
|
96 | + $result[$prefix] = $this->appConfig->getValueString('user_ldap', $prefix.$referenceConfigkey); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | return $result; |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | } else { |
111 | 111 | sort($prefixes); |
112 | 112 | $lastKey = array_pop($prefixes); |
113 | - $lastNumber = (int)str_replace('s', '', $lastKey); |
|
114 | - $prefix = 's' . str_pad((string)($lastNumber + 1), 2, '0', STR_PAD_LEFT); |
|
113 | + $lastNumber = (int) str_replace('s', '', $lastKey); |
|
114 | + $prefix = 's'.str_pad((string) ($lastNumber + 1), 2, '0', STR_PAD_LEFT); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $prefixes[] = $prefix; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | private function getServersConfig(string $value): array { |
123 | - $regex = '/' . $value . '$/S'; |
|
123 | + $regex = '/'.$value.'$/S'; |
|
124 | 124 | |
125 | 125 | $keys = $this->appConfig->getKeys('user_ldap'); |
126 | 126 | $result = []; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $query = $this->connection->getQueryBuilder(); |
150 | 150 | $query->delete('appconfig') |
151 | 151 | ->where($query->expr()->eq('appid', $query->createNamedParameter('user_ldap'))) |
152 | - ->andWhere($query->expr()->like('configkey', $query->createNamedParameter((string)$prefix . '%'))) |
|
152 | + ->andWhere($query->expr()->like('configkey', $query->createNamedParameter((string) $prefix.'%'))) |
|
153 | 153 | ->andWhere($query->expr()->notIn('configkey', $query->createNamedParameter([ |
154 | 154 | 'enabled', |
155 | 155 | 'installed_version', |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | public function haveDisabledConfigurations(): bool { |
176 | 176 | $all = $this->getServerConfigurationPrefixes(); |
177 | 177 | foreach ($all as $prefix) { |
178 | - if ($this->appConfig->getValueString('user_ldap', $prefix . 'ldap_configuration_active') !== '1') { |
|
178 | + if ($this->appConfig->getValueString('user_ldap', $prefix.'ldap_configuration_active') !== '1') { |
|
179 | 179 | return true; |
180 | 180 | } |
181 | 181 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } |
237 | 237 | |
238 | 238 | if (!is_string($dn)) { |
239 | - throw new \LogicException('String expected ' . \gettype($dn) . ' given'); |
|
239 | + throw new \LogicException('String expected '.\gettype($dn).' given'); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | if (($sanitizedDn = $this->sanitizeDnCache->get($dn)) !== null) { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | \OC_JSON::checkAppEnabled('user_ldap'); |
15 | 15 | \OC_JSON::callCheck(); |
16 | 16 | |
17 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
17 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
18 | 18 | $helper = Server::get(Helper::class); |
19 | 19 | if ($helper->deleteServerConfiguration($prefix)) { |
20 | 20 | \OC_JSON::success(); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | -> willReturnArgument(2); |
64 | 64 | |
65 | 65 | $this->appConfig->method('getValueString') |
66 | - ->willReturnCallback(function ($app, $key, $default) { |
|
66 | + ->willReturnCallback(function($app, $key, $default) { |
|
67 | 67 | if ($key === 's1ldap_configuration_active') { |
68 | 68 | return '1'; |
69 | 69 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | -> willReturnArgument(2); |
94 | 94 | |
95 | 95 | $this->appConfig->method('getValueString') |
96 | - ->willReturnCallback(function ($app, $key, $default) { |
|
96 | + ->willReturnCallback(function($app, $key, $default) { |
|
97 | 97 | if ($key === 'ldap_host') { |
98 | 98 | return 'example.com'; |
99 | 99 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | ]); |
127 | 127 | |
128 | 128 | $this->appConfig->method('getValueString') |
129 | - ->willReturnCallback(function ($app, $key, $default) { |
|
129 | + ->willReturnCallback(function($app, $key, $default) { |
|
130 | 130 | if ($key === 'ldap_host') { |
131 | 131 | return 'example.com'; |
132 | 132 | } |