Completed
Pull Request — master (#10023)
by Joas
206:15 queued 184:34
created
apps/user_ldap/lib/LDAP.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed
53 53
 	 */
54 54
 	public function connect($host, $port) {
55
-		if(strpos($host, '://') === false) {
56
-			$host = 'ldap://' . $host;
55
+		if (strpos($host, '://') === false) {
56
+			$host = 'ldap://'.$host;
57 57
 		}
58
-		if(strpos($host, ':', strpos($host, '://') + 1) === false) {
58
+		if (strpos($host, ':', strpos($host, '://') + 1) === false) {
59 59
 			//ldap_connect ignores port parameter when URLs are passed
60
-			$host .= ':' . $port;
60
+			$host .= ':'.$port;
61 61
 		}
62 62
 		return $this->invokeLDAPMethod('connect', $host);
63 63
 	}
@@ -267,13 +267,13 @@  discard block
 block discarded – undo
267 267
 	 * @return bool
268 268
 	 */
269 269
 	protected function isResultFalse($result) {
270
-		if($result === false) {
270
+		if ($result === false) {
271 271
 			return true;
272 272
 		}
273 273
 
274
-		if($this->curFunc === 'ldap_search' && is_array($result)) {
274
+		if ($this->curFunc === 'ldap_search' && is_array($result)) {
275 275
 			foreach ($result as $singleResult) {
276
-				if($singleResult === false) {
276
+				if ($singleResult === false) {
277 277
 					return true;
278 278
 				}
279 279
 			}
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 	 */
288 288
 	protected function invokeLDAPMethod() {
289 289
 		$arguments = func_get_args();
290
-		$func = 'ldap_' . array_shift($arguments);
291
-		if(function_exists($func)) {
290
+		$func = 'ldap_'.array_shift($arguments);
291
+		if (function_exists($func)) {
292 292
 			$this->preFunctionCall($func, $arguments);
293 293
 			$result = call_user_func_array($func, $arguments);
294 294
 			if ($this->isResultFalse($result)) {
@@ -318,12 +318,12 @@  discard block
 block discarded – undo
318 318
 	 */
319 319
 	private function processLDAPError($resource) {
320 320
 		$errorCode = ldap_errno($resource);
321
-		if($errorCode === 0) {
321
+		if ($errorCode === 0) {
322 322
 			return;
323 323
 		}
324
-		$errorMsg  = ldap_error($resource);
324
+		$errorMsg = ldap_error($resource);
325 325
 
326
-		if($this->curFunc === 'ldap_get_entries'
326
+		if ($this->curFunc === 'ldap_get_entries'
327 327
 			&& $errorCode === -4) {
328 328
 		} else if ($errorCode === 32) {
329 329
 			//for now
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 			throw new \Exception('LDAP Operations error', $errorCode);
340 340
 		} else if ($errorCode === 19) {
341 341
 			ldap_get_option($this->curArgs[0], LDAP_OPT_ERROR_STRING, $extended_error);
342
-			throw new ConstraintViolationException(!empty($extended_error)?$extended_error:$errorMsg, $errorCode);
342
+			throw new ConstraintViolationException(!empty($extended_error) ? $extended_error : $errorMsg, $errorCode);
343 343
 		} else {
344 344
 			\OC::$server->getLogger()->debug('LDAP error {message} ({code}) after calling {func}', [
345 345
 				'app' => 'user_ldap',
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
 	 * Called after an ldap method is run to act on LDAP error if necessary
355 355
 	 */
356 356
 	private function postFunctionCall() {
357
-		if($this->isResource($this->curArgs[0])) {
357
+		if ($this->isResource($this->curArgs[0])) {
358 358
 			$resource = $this->curArgs[0];
359
-		} else if(
359
+		} else if (
360 360
 			   $this->curFunc === 'ldap_search'
361 361
 			&& is_array($this->curArgs[0])
362 362
 			&& $this->isResource($this->curArgs[0][0])
Please login to merge, or discard this patch.
apps/updatenotification/lib/Notification/Notifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			$notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']]));
107 107
 
108 108
 			if ($this->isAdmin()) {
109
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index') . '#updater');
109
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index').'#updater');
110 110
 			}
111 111
 		} else {
112 112
 			$appInfo = $this->getAppInfo($notification->getObjectType());
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 				]);
127 127
 
128 128
 			if ($this->isAdmin()) {
129
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']) . '#app-' . $notification->getObjectType());
129
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps', ['category' => 'updates']).'#app-'.$notification->getObjectType());
130 130
 			}
131 131
 		}
132 132
 
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/BirthdayService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 			$calendar = $this->ensureCalendarExists($principalUri);
122 122
 			foreach (['', '-death', '-anniversary'] as $tag) {
123
-				$objectUri = $book['uri'] . '-' . $cardUri . $tag .'.ics';
123
+				$objectUri = $book['uri'].'-'.$cardUri.$tag.'.ics';
124 124
 				$this->calDavBackEnd->deleteCalendarObject($calendar['id'], $objectUri);
125 125
 			}
126 126
 		}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			return null;
176 176
 		}
177 177
 		$birthday = $doc->{$dateField};
178
-		if (!(string)$birthday) {
178
+		if (!(string) $birthday) {
179 179
 			return null;
180 180
 		}
181 181
 		// Skip if the BDAY property is not of the right type.
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 		$unknownYear = false;
194 194
 		if (!$dateParts['year']) {
195
-			$birthday = '1900-' . $dateParts['month'] . '-' . $dateParts['date'];
195
+			$birthday = '1900-'.$dateParts['month'].'-'.$dateParts['date'];
196 196
 
197 197
 			$unknownYear = true;
198 198
 		}
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
 			return null;
204 204
 		}
205 205
 		if ($unknownYear) {
206
-			$summary = $doc->FN->getValue() . ' ' . $summarySymbol;
206
+			$summary = $doc->FN->getValue().' '.$summarySymbol;
207 207
 		} else {
208
-			$year = (int)$date->format('Y');
209
-			$summary = $doc->FN->getValue() . " ($summarySymbol$year)";
208
+			$year = (int) $date->format('Y');
209
+			$summary = $doc->FN->getValue()." ($summarySymbol$year)";
210 210
 		}
211 211
 		$vCal = new VCalendar();
212 212
 		$vCal->VERSION = '2.0';
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 			$date
223 223
 		);
224 224
 		$vEvent->DTEND['VALUE'] = 'DATE';
225
-		$vEvent->{'UID'} = $doc->UID . $postfix;
225
+		$vEvent->{'UID'} = $doc->UID.$postfix;
226 226
 		$vEvent->{'RRULE'} = 'FREQ=YEARLY';
227 227
 		$vEvent->{'SUMMARY'} = $summary;
228 228
 		$vEvent->{'TRANSP'} = 'TRANSPARENT';
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
 		$principal = 'principals/users/'.$user;
243 243
 		$this->ensureCalendarExists($principal);
244 244
 		$books = $this->cardDavBackEnd->getAddressBooksForUser($principal);
245
-		foreach($books as $book) {
245
+		foreach ($books as $book) {
246 246
 			$cards = $this->cardDavBackEnd->getCards($book['id']);
247
-			foreach($cards as $card) {
247
+			foreach ($cards as $card) {
248 248
 				$this->onCardChanged($book['id'], $card['uri'], $card['carddata']);
249 249
 			}
250 250
 		}
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 * @param string[] $type
298 298
 	 */
299 299
 	private function updateCalendar($cardUri, $cardData, $book, $calendarId, $type) {
300
-		$objectUri = $book['uri'] . '-' . $cardUri . $type['postfix'] . '.ics';
300
+		$objectUri = $book['uri'].'-'.$cardUri.$type['postfix'].'.ics';
301 301
 		$calendarData = $this->buildDateFromContact($cardData, $type['field'], $type['postfix'], $type['symbol']);
302 302
 		$existing = $this->calDavBackEnd->getCalendarObject($calendarId, $objectUri);
303 303
 		if (is_null($calendarData)) {
Please login to merge, or discard this patch.
apps/user_ldap/composer/composer/autoload_classmap.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -6,62 +6,62 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\User_LDAP\\Access' => $baseDir . '/../lib/Access.php',
10
-    'OCA\\User_LDAP\\AccessFactory' => $baseDir . '/../lib/AccessFactory.php',
11
-    'OCA\\User_LDAP\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
12
-    'OCA\\User_LDAP\\BackendUtility' => $baseDir . '/../lib/BackendUtility.php',
13
-    'OCA\\User_LDAP\\Command\\CheckUser' => $baseDir . '/../lib/Command/CheckUser.php',
14
-    'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => $baseDir . '/../lib/Command/CreateEmptyConfig.php',
15
-    'OCA\\User_LDAP\\Command\\DeleteConfig' => $baseDir . '/../lib/Command/DeleteConfig.php',
16
-    'OCA\\User_LDAP\\Command\\Search' => $baseDir . '/../lib/Command/Search.php',
17
-    'OCA\\User_LDAP\\Command\\SetConfig' => $baseDir . '/../lib/Command/SetConfig.php',
18
-    'OCA\\User_LDAP\\Command\\ShowConfig' => $baseDir . '/../lib/Command/ShowConfig.php',
19
-    'OCA\\User_LDAP\\Command\\ShowRemnants' => $baseDir . '/../lib/Command/ShowRemnants.php',
20
-    'OCA\\User_LDAP\\Command\\TestConfig' => $baseDir . '/../lib/Command/TestConfig.php',
21
-    'OCA\\User_LDAP\\Configuration' => $baseDir . '/../lib/Configuration.php',
22
-    'OCA\\User_LDAP\\Connection' => $baseDir . '/../lib/Connection.php',
23
-    'OCA\\User_LDAP\\ConnectionFactory' => $baseDir . '/../lib/ConnectionFactory.php',
24
-    'OCA\\User_LDAP\\Controller\\ConfigAPIController' => $baseDir . '/../lib/Controller/ConfigAPIController.php',
25
-    'OCA\\User_LDAP\\Controller\\RenewPasswordController' => $baseDir . '/../lib/Controller/RenewPasswordController.php',
26
-    'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => $baseDir . '/../lib/Exceptions/ConstraintViolationException.php',
27
-    'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => $baseDir . '/../lib/Exceptions/NotOnLDAP.php',
28
-    'OCA\\User_LDAP\\FilesystemHelper' => $baseDir . '/../lib/FilesystemHelper.php',
29
-    'OCA\\User_LDAP\\GroupPluginManager' => $baseDir . '/../lib/GroupPluginManager.php',
30
-    'OCA\\User_LDAP\\Group_LDAP' => $baseDir . '/../lib/Group_LDAP.php',
31
-    'OCA\\User_LDAP\\Group_Proxy' => $baseDir . '/../lib/Group_Proxy.php',
32
-    'OCA\\User_LDAP\\Helper' => $baseDir . '/../lib/Helper.php',
33
-    'OCA\\User_LDAP\\IGroupLDAP' => $baseDir . '/../lib/IGroupLDAP.php',
34
-    'OCA\\User_LDAP\\ILDAPGroupPlugin' => $baseDir . '/../lib/ILDAPGroupPlugin.php',
35
-    'OCA\\User_LDAP\\ILDAPUserPlugin' => $baseDir . '/../lib/ILDAPUserPlugin.php',
36
-    'OCA\\User_LDAP\\ILDAPWrapper' => $baseDir . '/../lib/ILDAPWrapper.php',
37
-    'OCA\\User_LDAP\\IUserLDAP' => $baseDir . '/../lib/IUserLDAP.php',
38
-    'OCA\\User_LDAP\\Jobs\\CleanUp' => $baseDir . '/../lib/Jobs/CleanUp.php',
39
-    'OCA\\User_LDAP\\Jobs\\Sync' => $baseDir . '/../lib/Jobs/Sync.php',
40
-    'OCA\\User_LDAP\\Jobs\\UpdateGroups' => $baseDir . '/../lib/Jobs/UpdateGroups.php',
41
-    'OCA\\User_LDAP\\LDAP' => $baseDir . '/../lib/LDAP.php',
42
-    'OCA\\User_LDAP\\LDAPProvider' => $baseDir . '/../lib/LDAPProvider.php',
43
-    'OCA\\User_LDAP\\LDAPProviderFactory' => $baseDir . '/../lib/LDAPProviderFactory.php',
44
-    'OCA\\User_LDAP\\LDAPUtility' => $baseDir . '/../lib/LDAPUtility.php',
45
-    'OCA\\User_LDAP\\LogWrapper' => $baseDir . '/../lib/LogWrapper.php',
46
-    'OCA\\User_LDAP\\Mapping\\AbstractMapping' => $baseDir . '/../lib/Mapping/AbstractMapping.php',
47
-    'OCA\\User_LDAP\\Mapping\\GroupMapping' => $baseDir . '/../lib/Mapping/GroupMapping.php',
48
-    'OCA\\User_LDAP\\Mapping\\UserMapping' => $baseDir . '/../lib/Mapping/UserMapping.php',
49
-    'OCA\\User_LDAP\\Migration\\UUIDFix' => $baseDir . '/../lib/Migration/UUIDFix.php',
50
-    'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => $baseDir . '/../lib/Migration/UUIDFixGroup.php',
51
-    'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => $baseDir . '/../lib/Migration/UUIDFixInsert.php',
52
-    'OCA\\User_LDAP\\Migration\\UUIDFixUser' => $baseDir . '/../lib/Migration/UUIDFixUser.php',
53
-    'OCA\\User_LDAP\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php',
54
-    'OCA\\User_LDAP\\Proxy' => $baseDir . '/../lib/Proxy.php',
55
-    'OCA\\User_LDAP\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
56
-    'OCA\\User_LDAP\\Settings\\Section' => $baseDir . '/../lib/Settings/Section.php',
57
-    'OCA\\User_LDAP\\UserPluginManager' => $baseDir . '/../lib/UserPluginManager.php',
58
-    'OCA\\User_LDAP\\User\\DeletedUsersIndex' => $baseDir . '/../lib/User/DeletedUsersIndex.php',
59
-    'OCA\\User_LDAP\\User\\IUserTools' => $baseDir . '/../lib/User/IUserTools.php',
60
-    'OCA\\User_LDAP\\User\\Manager' => $baseDir . '/../lib/User/Manager.php',
61
-    'OCA\\User_LDAP\\User\\OfflineUser' => $baseDir . '/../lib/User/OfflineUser.php',
62
-    'OCA\\User_LDAP\\User\\User' => $baseDir . '/../lib/User/User.php',
63
-    'OCA\\User_LDAP\\User_LDAP' => $baseDir . '/../lib/User_LDAP.php',
64
-    'OCA\\User_LDAP\\User_Proxy' => $baseDir . '/../lib/User_Proxy.php',
65
-    'OCA\\User_LDAP\\Wizard' => $baseDir . '/../lib/Wizard.php',
66
-    'OCA\\User_LDAP\\WizardResult' => $baseDir . '/../lib/WizardResult.php',
9
+    'OCA\\User_LDAP\\Access' => $baseDir.'/../lib/Access.php',
10
+    'OCA\\User_LDAP\\AccessFactory' => $baseDir.'/../lib/AccessFactory.php',
11
+    'OCA\\User_LDAP\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
12
+    'OCA\\User_LDAP\\BackendUtility' => $baseDir.'/../lib/BackendUtility.php',
13
+    'OCA\\User_LDAP\\Command\\CheckUser' => $baseDir.'/../lib/Command/CheckUser.php',
14
+    'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => $baseDir.'/../lib/Command/CreateEmptyConfig.php',
15
+    'OCA\\User_LDAP\\Command\\DeleteConfig' => $baseDir.'/../lib/Command/DeleteConfig.php',
16
+    'OCA\\User_LDAP\\Command\\Search' => $baseDir.'/../lib/Command/Search.php',
17
+    'OCA\\User_LDAP\\Command\\SetConfig' => $baseDir.'/../lib/Command/SetConfig.php',
18
+    'OCA\\User_LDAP\\Command\\ShowConfig' => $baseDir.'/../lib/Command/ShowConfig.php',
19
+    'OCA\\User_LDAP\\Command\\ShowRemnants' => $baseDir.'/../lib/Command/ShowRemnants.php',
20
+    'OCA\\User_LDAP\\Command\\TestConfig' => $baseDir.'/../lib/Command/TestConfig.php',
21
+    'OCA\\User_LDAP\\Configuration' => $baseDir.'/../lib/Configuration.php',
22
+    'OCA\\User_LDAP\\Connection' => $baseDir.'/../lib/Connection.php',
23
+    'OCA\\User_LDAP\\ConnectionFactory' => $baseDir.'/../lib/ConnectionFactory.php',
24
+    'OCA\\User_LDAP\\Controller\\ConfigAPIController' => $baseDir.'/../lib/Controller/ConfigAPIController.php',
25
+    'OCA\\User_LDAP\\Controller\\RenewPasswordController' => $baseDir.'/../lib/Controller/RenewPasswordController.php',
26
+    'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => $baseDir.'/../lib/Exceptions/ConstraintViolationException.php',
27
+    'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => $baseDir.'/../lib/Exceptions/NotOnLDAP.php',
28
+    'OCA\\User_LDAP\\FilesystemHelper' => $baseDir.'/../lib/FilesystemHelper.php',
29
+    'OCA\\User_LDAP\\GroupPluginManager' => $baseDir.'/../lib/GroupPluginManager.php',
30
+    'OCA\\User_LDAP\\Group_LDAP' => $baseDir.'/../lib/Group_LDAP.php',
31
+    'OCA\\User_LDAP\\Group_Proxy' => $baseDir.'/../lib/Group_Proxy.php',
32
+    'OCA\\User_LDAP\\Helper' => $baseDir.'/../lib/Helper.php',
33
+    'OCA\\User_LDAP\\IGroupLDAP' => $baseDir.'/../lib/IGroupLDAP.php',
34
+    'OCA\\User_LDAP\\ILDAPGroupPlugin' => $baseDir.'/../lib/ILDAPGroupPlugin.php',
35
+    'OCA\\User_LDAP\\ILDAPUserPlugin' => $baseDir.'/../lib/ILDAPUserPlugin.php',
36
+    'OCA\\User_LDAP\\ILDAPWrapper' => $baseDir.'/../lib/ILDAPWrapper.php',
37
+    'OCA\\User_LDAP\\IUserLDAP' => $baseDir.'/../lib/IUserLDAP.php',
38
+    'OCA\\User_LDAP\\Jobs\\CleanUp' => $baseDir.'/../lib/Jobs/CleanUp.php',
39
+    'OCA\\User_LDAP\\Jobs\\Sync' => $baseDir.'/../lib/Jobs/Sync.php',
40
+    'OCA\\User_LDAP\\Jobs\\UpdateGroups' => $baseDir.'/../lib/Jobs/UpdateGroups.php',
41
+    'OCA\\User_LDAP\\LDAP' => $baseDir.'/../lib/LDAP.php',
42
+    'OCA\\User_LDAP\\LDAPProvider' => $baseDir.'/../lib/LDAPProvider.php',
43
+    'OCA\\User_LDAP\\LDAPProviderFactory' => $baseDir.'/../lib/LDAPProviderFactory.php',
44
+    'OCA\\User_LDAP\\LDAPUtility' => $baseDir.'/../lib/LDAPUtility.php',
45
+    'OCA\\User_LDAP\\LogWrapper' => $baseDir.'/../lib/LogWrapper.php',
46
+    'OCA\\User_LDAP\\Mapping\\AbstractMapping' => $baseDir.'/../lib/Mapping/AbstractMapping.php',
47
+    'OCA\\User_LDAP\\Mapping\\GroupMapping' => $baseDir.'/../lib/Mapping/GroupMapping.php',
48
+    'OCA\\User_LDAP\\Mapping\\UserMapping' => $baseDir.'/../lib/Mapping/UserMapping.php',
49
+    'OCA\\User_LDAP\\Migration\\UUIDFix' => $baseDir.'/../lib/Migration/UUIDFix.php',
50
+    'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => $baseDir.'/../lib/Migration/UUIDFixGroup.php',
51
+    'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => $baseDir.'/../lib/Migration/UUIDFixInsert.php',
52
+    'OCA\\User_LDAP\\Migration\\UUIDFixUser' => $baseDir.'/../lib/Migration/UUIDFixUser.php',
53
+    'OCA\\User_LDAP\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php',
54
+    'OCA\\User_LDAP\\Proxy' => $baseDir.'/../lib/Proxy.php',
55
+    'OCA\\User_LDAP\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php',
56
+    'OCA\\User_LDAP\\Settings\\Section' => $baseDir.'/../lib/Settings/Section.php',
57
+    'OCA\\User_LDAP\\UserPluginManager' => $baseDir.'/../lib/UserPluginManager.php',
58
+    'OCA\\User_LDAP\\User\\DeletedUsersIndex' => $baseDir.'/../lib/User/DeletedUsersIndex.php',
59
+    'OCA\\User_LDAP\\User\\IUserTools' => $baseDir.'/../lib/User/IUserTools.php',
60
+    'OCA\\User_LDAP\\User\\Manager' => $baseDir.'/../lib/User/Manager.php',
61
+    'OCA\\User_LDAP\\User\\OfflineUser' => $baseDir.'/../lib/User/OfflineUser.php',
62
+    'OCA\\User_LDAP\\User\\User' => $baseDir.'/../lib/User/User.php',
63
+    'OCA\\User_LDAP\\User_LDAP' => $baseDir.'/../lib/User_LDAP.php',
64
+    'OCA\\User_LDAP\\User_Proxy' => $baseDir.'/../lib/User_Proxy.php',
65
+    'OCA\\User_LDAP\\Wizard' => $baseDir.'/../lib/Wizard.php',
66
+    'OCA\\User_LDAP\\WizardResult' => $baseDir.'/../lib/WizardResult.php',
67 67
 );
Please login to merge, or discard this patch.
ocs/v1.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
  *
30 30
  */
31 31
 
32
-require_once __DIR__ . '/../lib/versioncheck.php';
33
-require_once __DIR__ . '/../lib/base.php';
32
+require_once __DIR__.'/../lib/versioncheck.php';
33
+require_once __DIR__.'/../lib/base.php';
34 34
 
35 35
 if (\OCP\Util::needUpgrade()
36 36
 	|| \OC::$server->getSystemConfig()->getValue('maintenance', false)) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
  * Try the appframework routes
73 73
  */
74 74
 try {
75
-	if(!\OC::$server->getUserSession()->isLoggedIn()) {
75
+	if (!\OC::$server->getUserSession()->isLoggedIn()) {
76 76
 		OC::handleLogin(\OC::$server->getRequest());
77 77
 	}
78 78
 	OC::$server->getRouter()->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo());
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	OC_API::setContentType();
81 81
 
82 82
 	$format = \OC::$server->getRequest()->getParam('format', 'xml');
83
-	$txt='Invalid query, please check the syntax. API specifications are here:'
83
+	$txt = 'Invalid query, please check the syntax. API specifications are here:'
84 84
 		.' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.'."\n";
85 85
 	OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format);
86 86
 } catch (MethodNotAllowedException $e) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	OC_API::setContentType();
96 96
 
97 97
 	$format = \OC::$server->getRequest()->getParam('format', 'xml');
98
-	$txt='Invalid query, please check the syntax. API specifications are here:'
98
+	$txt = 'Invalid query, please check the syntax. API specifications are here:'
99 99
 		.' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.'."\n";
100 100
 	OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format);
101 101
 }
Please login to merge, or discard this patch.
apps/files/lib/Service/TagService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 		}
123 123
 
124 124
 		$eventName = $addToFavorite ? 'addFavorite' : 'removeFavorite';
125
-		$this->dispatcher->dispatch(self::class . '::' . $eventName, new GenericEvent(null, [
125
+		$this->dispatcher->dispatch(self::class.'::'.$eventName, new GenericEvent(null, [
126 126
 			'userId' => $user->getUID(),
127 127
 			'fileId' => $fileId,
128 128
 			'path' => $path,
Please login to merge, or discard this patch.
apps/theming/lib/Capabilities.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
 				'color-element' => $this->util->elementColor($color),
80 80
 				'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()),
81 81
 				'background' => $backgroundLogo === 'backgroundColor' ?
82
-					$this->theming->getColorPrimary() :
83
-					$this->url->getAbsoluteURL($this->theming->getBackground()),
82
+					$this->theming->getColorPrimary() : $this->url->getAbsoluteURL($this->theming->getBackground()),
84 83
 				'background-plain' => $backgroundLogo === 'backgroundColor',
85 84
 				'background-default' => !$this->util->isBackgroundThemed(),
86 85
 			],
Please login to merge, or discard this patch.
apps/theming/lib/Util.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function invertTextColor($color) {
66 66
 		$l = $this->calculateLuma($color);
67
-		if($l>0.6) {
67
+		if ($l > 0.6) {
68 68
 			return true;
69 69
 		} else {
70 70
 			return false;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function elementColor($color) {
81 81
 		$l = $this->calculateLuminance($color);
82
-		if($l>0.8) {
82
+		if ($l > 0.8) {
83 83
 			return '#555555';
84 84
 		}
85 85
 		return $color;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		list($red, $green, $blue) = $this->hexToRGB($color);
94 94
 		$compiler = new Compiler();
95 95
 		$hsl = $compiler->toHSL($red, $green, $blue);
96
-		return $hsl[3]/100;
96
+		return $hsl[3] / 100;
97 97
 	}
98 98
 
99 99
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function calculateLuma($color) {
104 104
 		list($red, $green, $blue) = $this->hexToRGB($color);
105
-		return (0.2126 * $red  + 0.7152 * $green + 0.0722 * $blue) / 255;
105
+		return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255;
106 106
 	}
107 107
 
108 108
 	/**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	public function hexToRGB($color) {
113 113
 		$hex = preg_replace("/[^0-9A-Fa-f]/", '', $color);
114 114
 		if (strlen($hex) === 3) {
115
-			$hex = $hex{0} . $hex{0} . $hex{1} . $hex{1} . $hex{2} . $hex{2};
115
+			$hex = $hex{0}.$hex{0}.$hex{1}.$hex{1}.$hex{2}.$hex{2};
116 116
 		}
117 117
 		if (strlen($hex) !== 6) {
118 118
 			return 0;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @return string base64 encoded radio button svg
130 130
 	 */
131 131
 	public function generateRadioButton($color) {
132
-		$radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">' .
132
+		$radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">'.
133 133
 			'<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8z" fill="'.$color.'"/></svg>';
134 134
 		return base64_encode($radioButtonIcon);
135 135
 	}
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
 		$app = str_replace(array('\0', '/', '\\', '..'), '', $app);
144 144
 		try {
145 145
 			$appPath = $this->appManager->getAppPath($app);
146
-			$icon = $appPath . '/img/' . $app . '.svg';
146
+			$icon = $appPath.'/img/'.$app.'.svg';
147 147
 			if (file_exists($icon)) {
148 148
 				return $icon;
149 149
 			}
150
-			$icon = $appPath . '/img/app.svg';
150
+			$icon = $appPath.'/img/app.svg';
151 151
 			if (file_exists($icon)) {
152 152
 				return $icon;
153 153
 			}
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 				}
163 163
 			} catch (NotFoundException $e) {}
164 164
 		}
165
-		return \OC::$SERVERROOT . '/core/img/logo.svg';
165
+		return \OC::$SERVERROOT.'/core/img/logo.svg';
166 166
 	}
167 167
 
168 168
 	/**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		$app = str_replace(array('\0', '/', '\\', '..'), '', $app);
175 175
 		$image = str_replace(array('\0', '\\', '..'), '', $image);
176 176
 		if ($app === "core") {
177
-			$icon = \OC::$SERVERROOT . '/core/img/' . $image;
177
+			$icon = \OC::$SERVERROOT.'/core/img/'.$image;
178 178
 			if (file_exists($icon)) {
179 179
 				return $icon;
180 180
 			}
@@ -186,23 +186,23 @@  discard block
 block discarded – undo
186 186
 			return false;
187 187
 		}
188 188
 
189
-		$icon = $appPath . '/img/' . $image;
189
+		$icon = $appPath.'/img/'.$image;
190 190
 		if (file_exists($icon)) {
191 191
 			return $icon;
192 192
 		}
193
-		$icon = $appPath . '/img/' . $image . '.svg';
193
+		$icon = $appPath.'/img/'.$image.'.svg';
194 194
 		if (file_exists($icon)) {
195 195
 			return $icon;
196 196
 		}
197
-		$icon = $appPath . '/img/' . $image . '.png';
197
+		$icon = $appPath.'/img/'.$image.'.png';
198 198
 		if (file_exists($icon)) {
199 199
 			return $icon;
200 200
 		}
201
-		$icon = $appPath . '/img/' . $image . '.gif';
201
+		$icon = $appPath.'/img/'.$image.'.gif';
202 202
 		if (file_exists($icon)) {
203 203
 			return $icon;
204 204
 		}
205
-		$icon = $appPath . '/img/' . $image . '.jpg';
205
+		$icon = $appPath.'/img/'.$image.'.jpg';
206 206
 		if (file_exists($icon)) {
207 207
 			return $icon;
208 208
 		}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	}
237 237
 
238 238
 	public function isBackgroundThemed() {
239
-		$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false);
239
+		$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false);
240 240
 
241 241
 		$backgroundExists = true;
242 242
 		try {
Please login to merge, or discard this patch.
apps/user_ldap/lib/Jobs/Sync.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			$pagingSize = $this->config->getAppValue('user_ldap', $configKey, $minPagingSize);
113 113
 			$minPagingSize = $minPagingSize === null ? $pagingSize : min($minPagingSize, $pagingSize);
114 114
 		}
115
-		return (int)$minPagingSize;
115
+		return (int) $minPagingSize;
116 116
 	}
117 117
 
118 118
 	/**
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
 
124 124
 		$isBackgroundJobModeAjax = $this->config
125 125
 				->getAppValue('core', 'backgroundjobs_mode', 'ajax') === 'ajax';
126
-		if($isBackgroundJobModeAjax) {
126
+		if ($isBackgroundJobModeAjax) {
127 127
 			return;
128 128
 		}
129 129
 
130 130
 		$cycleData = $this->getCycle();
131
-		if($cycleData === null) {
131
+		if ($cycleData === null) {
132 132
 			$cycleData = $this->determineNextCycle();
133
-			if($cycleData === null) {
133
+			if ($cycleData === null) {
134 134
 				$this->updateInterval();
135 135
 				return;
136 136
 			}
137 137
 		}
138 138
 
139
-		if(!$this->qualifiesToRun($cycleData)) {
139
+		if (!$this->qualifiesToRun($cycleData)) {
140 140
 			$this->updateInterval();
141 141
 			return;
142 142
 		}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
 		$filter = $access->combineFilterWithAnd(array(
167 167
 			$access->connection->ldapUserFilter,
168
-			$access->connection->ldapUserDisplayName . '=*',
168
+			$access->connection->ldapUserDisplayName.'=*',
169 169
 			$access->getFilterPartForUserSearch('')
170 170
 		));
171 171
 		$results = $access->fetchListOfUsers(
@@ -176,10 +176,10 @@  discard block
 block discarded – undo
176 176
 			true
177 177
 		);
178 178
 
179
-		if((int)$connection->ldapPagingSize === 0) {
179
+		if ((int) $connection->ldapPagingSize === 0) {
180 180
 			return false;
181 181
 		}
182
-		return count($results) >= (int)$connection->ldapPagingSize;
182
+		return count($results) >= (int) $connection->ldapPagingSize;
183 183
 	}
184 184
 
185 185
 	/**
@@ -190,16 +190,16 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	public function getCycle() {
192 192
 		$prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true);
193
-		if(count($prefixes) === 0) {
193
+		if (count($prefixes) === 0) {
194 194
 			return null;
195 195
 		}
196 196
 
197 197
 		$cycleData = [
198 198
 			'prefix' => $this->config->getAppValue('user_ldap', 'background_sync_prefix', null),
199
-			'offset' => (int)$this->config->getAppValue('user_ldap', 'background_sync_offset', 0),
199
+			'offset' => (int) $this->config->getAppValue('user_ldap', 'background_sync_offset', 0),
200 200
 		];
201 201
 
202
-		if(
202
+		if (
203 203
 			$cycleData['prefix'] !== null
204 204
 			&& in_array($cycleData['prefix'], $prefixes)
205 205
 		) {
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 	 */
229 229
 	public function determineNextCycle(array $cycleData = null) {
230 230
 		$prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true);
231
-		if(count($prefixes) === 0) {
231
+		if (count($prefixes) === 0) {
232 232
 			return null;
233 233
 		}
234 234
 
235 235
 		// get the next prefix in line and remember it
236 236
 		$oldPrefix = $cycleData === null ? null : $cycleData['prefix'];
237 237
 		$prefix = $this->getNextPrefix($oldPrefix);
238
-		if($prefix === null) {
238
+		if ($prefix === null) {
239 239
 			return null;
240 240
 		}
241 241
 		$cycleData['prefix'] = $prefix;
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
 	 * @return bool
254 254
 	 */
255 255
 	public function qualifiesToRun($cycleData) {
256
-		$lastChange = $this->config->getAppValue('user_ldap', $cycleData['prefix'] . '_lastChange', 0);
257
-		if((time() - $lastChange) > 60 * 30) {
256
+		$lastChange = $this->config->getAppValue('user_ldap', $cycleData['prefix'].'_lastChange', 0);
257
+		if ((time() - $lastChange) > 60 * 30) {
258 258
 			return true;
259 259
 		}
260 260
 		return false;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	protected function increaseOffset($cycleData) {
269 269
 		$ldapConfig = new Configuration($cycleData['prefix']);
270
-		$cycleData['offset'] += (int)$ldapConfig->ldapPagingSize;
270
+		$cycleData['offset'] += (int) $ldapConfig->ldapPagingSize;
271 271
 		$this->setCycle($cycleData);
272 272
 	}
273 273
 
@@ -280,17 +280,17 @@  discard block
 block discarded – undo
280 280
 	protected function getNextPrefix($lastPrefix) {
281 281
 		$prefixes = $this->ldapHelper->getServerConfigurationPrefixes(true);
282 282
 		$noOfPrefixes = count($prefixes);
283
-		if($noOfPrefixes === 0) {
283
+		if ($noOfPrefixes === 0) {
284 284
 			return null;
285 285
 		}
286 286
 		$i = $lastPrefix === null ? false : array_search($lastPrefix, $prefixes, true);
287
-		if($i === false) {
287
+		if ($i === false) {
288 288
 			$i = -1;
289 289
 		} else {
290 290
 			$i++;
291 291
 		}
292 292
 
293
-		if(!isset($prefixes[$i])) {
293
+		if (!isset($prefixes[$i])) {
294 294
 			$i = 0;
295 295
 		}
296 296
 		return $prefixes[$i];
@@ -302,49 +302,49 @@  discard block
 block discarded – undo
302 302
 	 * @param array $argument
303 303
 	 */
304 304
 	public function setArgument($argument) {
305
-		if(isset($argument['config'])) {
305
+		if (isset($argument['config'])) {
306 306
 			$this->config = $argument['config'];
307 307
 		} else {
308 308
 			$this->config = \OC::$server->getConfig();
309 309
 		}
310 310
 
311
-		if(isset($argument['helper'])) {
311
+		if (isset($argument['helper'])) {
312 312
 			$this->ldapHelper = $argument['helper'];
313 313
 		} else {
314 314
 			$this->ldapHelper = new Helper($this->config);
315 315
 		}
316 316
 
317
-		if(isset($argument['ldapWrapper'])) {
317
+		if (isset($argument['ldapWrapper'])) {
318 318
 			$this->ldap = $argument['ldapWrapper'];
319 319
 		} else {
320 320
 			$this->ldap = new LDAP();
321 321
 		}
322 322
 
323
-		if(isset($argument['avatarManager'])) {
323
+		if (isset($argument['avatarManager'])) {
324 324
 			$this->avatarManager = $argument['avatarManager'];
325 325
 		} else {
326 326
 			$this->avatarManager = \OC::$server->getAvatarManager();
327 327
 		}
328 328
 
329
-		if(isset($argument['dbc'])) {
329
+		if (isset($argument['dbc'])) {
330 330
 			$this->dbc = $argument['dbc'];
331 331
 		} else {
332 332
 			$this->dbc = \OC::$server->getDatabaseConnection();
333 333
 		}
334 334
 
335
-		if(isset($argument['ncUserManager'])) {
335
+		if (isset($argument['ncUserManager'])) {
336 336
 			$this->ncUserManager = $argument['ncUserManager'];
337 337
 		} else {
338 338
 			$this->ncUserManager = \OC::$server->getUserManager();
339 339
 		}
340 340
 
341
-		if(isset($argument['notificationManager'])) {
341
+		if (isset($argument['notificationManager'])) {
342 342
 			$this->notificationManager = $argument['notificationManager'];
343 343
 		} else {
344 344
 			$this->notificationManager = \OC::$server->getNotificationManager();
345 345
 		}
346 346
 
347
-		if(isset($argument['userManager'])) {
347
+		if (isset($argument['userManager'])) {
348 348
 			$this->userManager = $argument['userManager'];
349 349
 		} else {
350 350
 			$this->userManager = new Manager(
@@ -359,19 +359,19 @@  discard block
 block discarded – undo
359 359
 			);
360 360
 		}
361 361
 
362
-		if(isset($argument['mapper'])) {
362
+		if (isset($argument['mapper'])) {
363 363
 			$this->mapper = $argument['mapper'];
364 364
 		} else {
365 365
 			$this->mapper = new UserMapping($this->dbc);
366 366
 		}
367 367
 		
368
-		if(isset($argument['connectionFactory'])) {
368
+		if (isset($argument['connectionFactory'])) {
369 369
 			$this->connectionFactory = $argument['connectionFactory'];
370 370
 		} else {
371 371
 			$this->connectionFactory = new ConnectionFactory($this->ldap);
372 372
 		}
373 373
 
374
-		if(isset($argument['accessFactory'])) {
374
+		if (isset($argument['accessFactory'])) {
375 375
 			$this->accessFactory = $argument['accessFactory'];
376 376
 		} else {
377 377
 			$this->accessFactory = new AccessFactory(
Please login to merge, or discard this patch.