Completed
Push — master ( d156bb...f314d9 )
by
unknown
26:01 queued 13s
created
apps/user_ldap/lib/Helper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
apps/user_ldap/ajax/deleteConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
apps/user_ldap/tests/HelperTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 				}
Please login to merge, or discard this patch.