Passed
Push — master ( 0ae68c...0a5764 )
by Roeland
21:54 queued 10:49
created
lib/private/Collaboration/Collaborators/LookupPlugin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	public function search($search, $limit, $offset, ISearchResult $searchResult) {
64 64
 		$isGlobalScaleEnabled = $this->config->getSystemValue('gs.enabled', false);
65 65
 		$isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no') === 'yes';
66
-		$hasInternetConnection = (bool)$this->config->getSystemValue('has_internet_connection', true);
66
+		$hasInternetConnection = (bool) $this->config->getSystemValue('has_internet_connection', true);
67 67
 
68 68
 		// if case of Global Scale we always search the lookup server
69 69
 		if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection)) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		}
72 72
 
73 73
 		$lookupServerUrl = $this->config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com');
74
-		if(empty($lookupServerUrl)) {
74
+		if (empty($lookupServerUrl)) {
75 75
 			return false;
76 76
 		}
77 77
 		$lookupServerUrl = rtrim($lookupServerUrl, '/');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		try {
81 81
 			$client = $this->clientService->newClient();
82 82
 			$response = $client->get(
83
-				$lookupServerUrl . '/users?search=' . urlencode($search),
83
+				$lookupServerUrl.'/users?search='.urlencode($search),
84 84
 				[
85 85
 					'timeout' => 10,
86 86
 					'connect_timeout' => 3,
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 				try {
94 94
 					$remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote();
95 95
 				} catch (\Exception $e) {
96
-					$this->logger->error('Can not parse federated cloud ID "' .  $lookup['federationId'] . '"');
96
+					$this->logger->error('Can not parse federated cloud ID "'.$lookup['federationId'].'"');
97 97
 					$this->logger->error($e->getMessage());
98 98
 					continue;
99 99
 				}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 					continue;
102 102
 				}
103 103
 				$name = isset($lookup['name']['value']) ? $lookup['name']['value'] : '';
104
-				$label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')';
104
+				$label = empty($name) ? $lookup['federationId'] : $name.' ('.$lookup['federationId'].')';
105 105
 				$result[] = [
106 106
 					'label' => $label,
107 107
 					'value' => [
Please login to merge, or discard this patch.