Passed
Push — master ( f0dd71...c56a27 )
by Christoph
11:49 queued 12s
created
apps/files_sharing/lib/AppInfo/Application.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		/**
85 85
 		 * Controllers
86 86
 		 */
87
-		$container->registerService('ShareController', function (SimpleContainer $c) use ($server) {
87
+		$container->registerService('ShareController', function(SimpleContainer $c) use ($server) {
88 88
 			$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
89 89
 			return new ShareController(
90 90
 				$c->query('AppName'),
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 				$server->query(Defaults::class)
105 105
 			);
106 106
 		});
107
-		$container->registerService('ExternalSharesController', function (SimpleContainer $c) {
107
+		$container->registerService('ExternalSharesController', function(SimpleContainer $c) {
108 108
 			return new ExternalSharesController(
109 109
 				$c->query('AppName'),
110 110
 				$c->query('Request'),
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 		/**
117 117
 		 * Core class wrappers
118 118
 		 */
119
-		$container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) {
119
+		$container->registerService('HttpClientService', function(SimpleContainer $c) use ($server) {
120 120
 			return $server->getHTTPClientService();
121 121
 		});
122
-		$container->registerService(ICloudIdManager::class, function (SimpleContainer $c) use ($server) {
122
+		$container->registerService(ICloudIdManager::class, function(SimpleContainer $c) use ($server) {
123 123
 			return $server->getCloudIdManager();
124 124
 		});
125
-		$container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) {
125
+		$container->registerService('ExternalManager', function(SimpleContainer $c) use ($server) {
126 126
 			$user = $server->getUserSession()->getUser();
127 127
 			$uid = $user ? $user->getUID() : null;
128 128
 			return new \OCA\Files_Sharing\External\Manager(
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		/**
145 145
 		 * Middleware
146 146
 		 */
147
-		$container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use ($server) {
147
+		$container->registerService('SharingCheckMiddleware', function(SimpleContainer $c) use ($server) {
148 148
 			return new SharingCheckMiddleware(
149 149
 				$c->query('AppName'),
150 150
 				$server->getConfig(),
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			);
156 156
 		});
157 157
 
158
-		$container->registerService(ShareInfoMiddleware::class, function () use ($server) {
158
+		$container->registerService(ShareInfoMiddleware::class, function() use ($server) {
159 159
 			return new ShareInfoMiddleware(
160 160
 				$server->getShareManager()
161 161
 			);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 		$container->registerMiddleWare(OCSShareAPIMiddleware::class);
167 167
 		$container->registerMiddleWare(ShareInfoMiddleware::class);
168 168
 
169
-		$container->registerService('MountProvider', function (IContainer $c) {
169
+		$container->registerService('MountProvider', function(IContainer $c) {
170 170
 			/** @var \OCP\IServerContainer $server */
171 171
 			$server = $c->query('ServerContainer');
172 172
 			return new MountProvider(
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 			);
177 177
 		});
178 178
 
179
-		$container->registerService('ExternalMountProvider', function (IContainer $c) {
179
+		$container->registerService('ExternalMountProvider', function(IContainer $c) {
180 180
 			/** @var \OCP\IServerContainer $server */
181 181
 			$server = $c->query('ServerContainer');
182 182
 			return new \OCA\Files_Sharing\External\MountProvider(
183 183
 				$server->getDatabaseConnection(),
184
-				function () use ($c) {
184
+				function() use ($c) {
185 185
 					return $c->query('ExternalManager');
186 186
 				},
187 187
 				$server->getCloudIdManager()
@@ -215,19 +215,19 @@  discard block
 block discarded – undo
215 215
 		$dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class);
216 216
 		$dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class);
217 217
 		$dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class);
218
-		$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
218
+		$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() {
219 219
 			\OCP\Util::addScript('files_sharing', 'dist/collaboration');
220 220
 		});
221 221
 		$dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class);
222 222
 		$dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class);
223 223
 
224 224
 		// notifications api to accept incoming user shares
225
-		$dispatcher->addListener('OCP\Share::postShare', function (GenericEvent $event) {
225
+		$dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) {
226 226
 			/** @var Listener $listener */
227 227
 			$listener = $this->getContainer()->query(Listener::class);
228 228
 			$listener->shareNotification($event);
229 229
 		});
230
-		$dispatcher->addListener(IGroup::class . '::postAddUser', function (GenericEvent $event) {
230
+		$dispatcher->addListener(IGroup::class.'::postAddUser', function(GenericEvent $event) {
231 231
 			/** @var Listener $listener */
232 232
 			$listener = $this->getContainer()->query(Listener::class);
233 233
 			$listener->userAddedToGroup($event);
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/ShareesAPIController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -138,13 +138,13 @@  discard block
 block discarded – undo
138 138
 	public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = true): DataResponse {
139 139
 
140 140
 		// only search for string larger than a given threshold
141
-		$threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0);
141
+		$threshold = (int) $this->config->getSystemValue('sharing.minSearchStringLength', 0);
142 142
 		if (strlen($search) < $threshold) {
143 143
 			return new DataResponse($this->result);
144 144
 		}
145 145
 
146 146
 		// never return more than the max. number of results configured in the config.php
147
-		$maxResults = (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0);
147
+		$maxResults = (int) $this->config->getSystemValue('sharing.maxAutocompleteResults', 0);
148 148
 		if ($maxResults > 0) {
149 149
 			$perPage = min($perPage, $maxResults);
150 150
 		}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
213 213
 
214 214
 		// extra treatment for 'exact' subarray, with a single merge expected keys might be lost
215
-		if(isset($result['exact'])) {
215
+		if (isset($result['exact'])) {
216 216
 			$result['exact'] = array_merge($this->result['exact'], $result['exact']);
217 217
 		}
218 218
 		$this->result = array_merge($this->result, $result);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	}
258 258
 
259 259
 	private function sortShareesByFrequency(array $sharees): array {
260
-		usort($sharees, function (array $s1, array $s2) {
260
+		usort($sharees, function(array $s1, array $s2) {
261 261
 			return $s2['count'] - $s1['count'];
262 262
 		});
263 263
 		return $sharees;
@@ -408,12 +408,12 @@  discard block
 block discarded – undo
408 408
 	 */
409 409
 	protected function getPaginationLink(int $page, array $params): string {
410 410
 		if ($this->isV2()) {
411
-			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees') . '?';
411
+			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees').'?';
412 412
 		} else {
413
-			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?';
413
+			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees').'?';
414 414
 		}
415 415
 		$params['page'] = $page + 1;
416
-		return '<' . $url . http_build_query($params) . '>; rel="next"';
416
+		return '<'.$url.http_build_query($params).'>; rel="next"';
417 417
 	}
418 418
 
419 419
 	/**
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/ShareAPIController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			// "share_with" and "share_with_displayname" for passwords of link
228 228
 			// shares was deprecated in Nextcloud 15, use "password" instead.
229 229
 			$result['share_with'] = $share->getPassword();
230
-			$result['share_with_displayname'] = '(' . $this->l->t('Shared link') . ')';
230
+			$result['share_with_displayname'] = '('.$this->l->t('Shared link').')';
231 231
 
232 232
 			$result['password'] = $share->getPassword();
233 233
 
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 
603 603
 		$shares = array_merge($userShares, $groupShares, $circleShares, $roomShares);
604 604
 
605
-		$shares = array_filter($shares, function (IShare $share) {
605
+		$shares = array_filter($shares, function(IShare $share) {
606 606
 			return $share->getShareOwner() !== $this->currentUser;
607 607
 		});
608 608
 
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 		$nodes = $folder->getDirectoryListing();
640 640
 
641 641
 		/** @var \OCP\Share\IShare[] $shares */
642
-		$shares = array_reduce($nodes, function ($carry, $node) {
642
+		$shares = array_reduce($nodes, function($carry, $node) {
643 643
 			$carry = array_merge($carry, $this->getAllShares($node, true));
644 644
 			return $carry;
645 645
 		}, []);
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
 			}
1112 1112
 		}
1113 1113
 
1114
-		$result = array_filter(array_map(function (IShare $share) {
1114
+		$result = array_filter(array_map(function(IShare $share) {
1115 1115
 			$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
1116 1116
 			$nodes = $userFolder->getById($share->getNodeId());
1117 1117
 			if (empty($nodes)) {
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
 			} catch (NotFoundException $e) {
1134 1134
 				return null;
1135 1135
 			}
1136
-		}, $pendingShares), function ($entry) {
1136
+		}, $pendingShares), function($entry) {
1137 1137
 			return $entry !== null;
1138 1138
 		});
1139 1139
 
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
 
1377 1377
 		// First check if it is an internal share.
1378 1378
 		try {
1379
-			$share = $this->shareManager->getShareById('ocinternal:' . $id, $this->currentUser);
1379
+			$share = $this->shareManager->getShareById('ocinternal:'.$id, $this->currentUser);
1380 1380
 			return $share;
1381 1381
 		} catch (ShareNotFound $e) {
1382 1382
 			// Do nothing, just try the other share type
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 
1386 1386
 		try {
1387 1387
 			if ($this->shareManager->shareProviderExists(Share::SHARE_TYPE_CIRCLE)) {
1388
-				$share = $this->shareManager->getShareById('ocCircleShare:' . $id, $this->currentUser);
1388
+				$share = $this->shareManager->getShareById('ocCircleShare:'.$id, $this->currentUser);
1389 1389
 				return $share;
1390 1390
 			}
1391 1391
 		} catch (ShareNotFound $e) {
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
 
1395 1395
 		try {
1396 1396
 			if ($this->shareManager->shareProviderExists(Share::SHARE_TYPE_EMAIL)) {
1397
-				$share = $this->shareManager->getShareById('ocMailShare:' . $id, $this->currentUser);
1397
+				$share = $this->shareManager->getShareById('ocMailShare:'.$id, $this->currentUser);
1398 1398
 				return $share;
1399 1399
 			}
1400 1400
 		} catch (ShareNotFound $e) {
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
 		}
1403 1403
 
1404 1404
 		try {
1405
-			$share = $this->shareManager->getShareById('ocRoomShare:' . $id, $this->currentUser);
1405
+			$share = $this->shareManager->getShareById('ocRoomShare:'.$id, $this->currentUser);
1406 1406
 			return $share;
1407 1407
 		} catch (ShareNotFound $e) {
1408 1408
 			// Do nothing, just try the other share type
@@ -1411,7 +1411,7 @@  discard block
 block discarded – undo
1411 1411
 		if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) {
1412 1412
 			throw new ShareNotFound();
1413 1413
 		}
1414
-		$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id, $this->currentUser);
1414
+		$share = $this->shareManager->getShareById('ocFederatedSharing:'.$id, $this->currentUser);
1415 1415
 
1416 1416
 		return $share;
1417 1417
 	}
Please login to merge, or discard this patch.
apps/files_sharing/lib/ShareBackend/Folder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 
113 113
 			$qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
114 114
 
115
-			$parents = array_map(function ($parent) use ($qb) {
115
+			$parents = array_map(function($parent) use ($qb) {
116 116
 				return $qb->createNamedParameter($parent);
117 117
 			}, $parents);
118 118
 
Please login to merge, or discard this patch.
apps/files_sharing/lib/MountProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
 		$shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), \OCP\Share::SHARE_TYPE_ROOM, null, -1));
82 82
 
83 83
 		// filter out excluded shares and group shares that includes self
84
-		$shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) {
84
+		$shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) {
85 85
 			return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID();
86 86
 		});
87 87
 
88 88
 		$superShares = $this->buildSuperShares($shares, $user);
89 89
 
90 90
 		$mounts = [];
91
-		$view = new View('/' . $user->getUID() . '/files');
91
+		$view = new View('/'.$user->getUID().'/files');
92 92
 		$ownerViews = [];
93 93
 		$sharingDisabledForUser = $this->shareManager->sharingDisabledForUser($user->getUID());
94 94
 		$foldersExistCache = new CappedMemoryCache();
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 				$owner = $parentShare->getShareOwner();
108 108
 				if (!isset($ownerViews[$owner])) {
109
-					$ownerViews[$owner] = new View('/' . $parentShare->getShareOwner() . '/files');
109
+					$ownerViews[$owner] = new View('/'.$parentShare->getShareOwner().'/files');
110 110
 				}
111 111
 				$mount = new SharedMount(
112 112
 					'\OCA\Files_Sharing\SharedStorage',
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		$result = [];
156 156
 		// sort by stime, the super share will be based on the least recent share
157 157
 		foreach ($tmp as &$tmp2) {
158
-			@usort($tmp2, function ($a, $b) {
158
+			@usort($tmp2, function($a, $b) {
159 159
 				if ($a->getShareTime() <= $b->getShareTime()) {
160 160
 					return -1;
161 161
 				}
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 						// null groups which usually appear with group backend
221 221
 						// caching inconsistencies
222 222
 						$this->logger->debug(
223
-							'Could not adjust share target for share ' . $share->getId() . ' to make it consistent: ' . $e->getMessage(),
223
+							'Could not adjust share target for share '.$share->getId().' to make it consistent: '.$e->getMessage(),
224 224
 							['app' => 'files_sharing']
225 225
 						);
226 226
 					}
Please login to merge, or discard this patch.
apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,36 +51,36 @@  discard block
 block discarded – undo
51 51
 
52 52
 	public function sort(array &$sortArray, array $context) {
53 53
 		// let's be tolerant. Comments  uses "files" by default, other usages are often singular
54
-		if($context['itemType'] !== 'files' && $context['itemType'] !== 'file') {
54
+		if ($context['itemType'] !== 'files' && $context['itemType'] !== 'file') {
55 55
 			return;
56 56
 		}
57 57
 		$user = $this->userSession->getUser();
58
-		if($user === null) {
58
+		if ($user === null) {
59 59
 			return;
60 60
 		}
61 61
 		$userFolder = $this->rootFolder->getUserFolder($user->getUID());
62 62
 		/** @var Node[] $nodes */
63
-		$nodes = $userFolder->getById((int)$context['itemId']);
64
-		if(count($nodes) === 0) {
63
+		$nodes = $userFolder->getById((int) $context['itemId']);
64
+		if (count($nodes) === 0) {
65 65
 			return;
66 66
 		}
67 67
 		$al = $this->shareManager->getAccessList($nodes[0]);
68 68
 
69 69
 		foreach ($sortArray as $type => &$byType) {
70
-			if(!isset($al[$type]) || !is_array($al[$type])) {
70
+			if (!isset($al[$type]) || !is_array($al[$type])) {
71 71
 				continue;
72 72
 			}
73 73
 
74 74
 			// at least on PHP 5.6 usort turned out to be not stable. So we add
75 75
 			// the current index to the value and compare it on a draw
76 76
 			$i = 0;
77
-			$workArray = array_map(function ($element) use (&$i) {
77
+			$workArray = array_map(function($element) use (&$i) {
78 78
 				return [$i++, $element];
79 79
 			}, $byType);
80 80
 
81
-			usort($workArray, function ($a, $b) use ($al, $type) {
81
+			usort($workArray, function($a, $b) use ($al, $type) {
82 82
 				$result = $this->compare($a[1], $b[1], $al[$type]);
83
-				if($result === 0) {
83
+				if ($result === 0) {
84 84
 					$result = $a[0] - $b[0];
85 85
 				}
86 86
 				return $result;
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 		$a = $a['value']['shareWith'];
102 102
 		$b = $b['value']['shareWith'];
103 103
 
104
-		$valueA = (int)in_array($a, $al, true);
105
-		$valueB = (int)in_array($b, $al, true);
104
+		$valueA = (int) in_array($a, $al, true);
105
+		$valueB = (int) in_array($b, $al, true);
106 106
 
107 107
 		return $valueB - $valueA;
108 108
 	}
Please login to merge, or discard this patch.
apps/theming/lib/ThemingDefaults.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -150,37 +150,37 @@  discard block
 block discarded – undo
150 150
 	}
151 151
 
152 152
 	public function getImprintUrl() {
153
-		return (string)$this->config->getAppValue('theming', 'imprintUrl', '');
153
+		return (string) $this->config->getAppValue('theming', 'imprintUrl', '');
154 154
 	}
155 155
 
156 156
 	public function getPrivacyUrl() {
157
-		return (string)$this->config->getAppValue('theming', 'privacyUrl', '');
157
+		return (string) $this->config->getAppValue('theming', 'privacyUrl', '');
158 158
 	}
159 159
 
160 160
 	public function getShortFooter() {
161 161
 		$slogan = $this->getSlogan();
162 162
 		$baseUrl = $this->getBaseUrl();
163 163
 		if ($baseUrl !== '') {
164
-			$footer = '<a href="' . $baseUrl . '" target="_blank"' .
165
-				' rel="noreferrer noopener" class="entity-name">' . $this->getEntity() . '</a>';
164
+			$footer = '<a href="'.$baseUrl.'" target="_blank"'.
165
+				' rel="noreferrer noopener" class="entity-name">'.$this->getEntity().'</a>';
166 166
 		} else {
167
-			$footer = '<span class="entity-name">' .$this->getEntity() . '</span>';
167
+			$footer = '<span class="entity-name">'.$this->getEntity().'</span>';
168 168
 		}
169
-		$footer .= ($slogan !== '' ? ' – ' . $slogan : '');
169
+		$footer .= ($slogan !== '' ? ' – '.$slogan : '');
170 170
 
171 171
 		$links = [
172 172
 			[
173 173
 				'text' => $this->l->t('Legal notice'),
174
-				'url' => (string)$this->getImprintUrl()
174
+				'url' => (string) $this->getImprintUrl()
175 175
 			],
176 176
 			[
177 177
 				'text' => $this->l->t('Privacy policy'),
178
-				'url' => (string)$this->getPrivacyUrl()
178
+				'url' => (string) $this->getPrivacyUrl()
179 179
 			],
180 180
 		];
181 181
 
182 182
 		$navigation = $this->navigationManager->getAll(INavigationManager::TYPE_GUEST);
183
-		$guestNavigation = array_map(function ($nav) {
183
+		$guestNavigation = array_map(function($nav) {
184 184
 			return [
185 185
 				'text' => $nav['name'],
186 186
 				'url' => $nav['href']
@@ -189,17 +189,17 @@  discard block
 block discarded – undo
189 189
 		$links = array_merge($links, $guestNavigation);
190 190
 
191 191
 		$legalLinks = ''; $divider = '';
192
-		foreach($links as $link) {
193
-			if($link['url'] !== ''
192
+		foreach ($links as $link) {
193
+			if ($link['url'] !== ''
194 194
 				&& filter_var($link['url'], FILTER_VALIDATE_URL)
195 195
 			) {
196
-				$legalLinks .= $divider . '<a href="' . $link['url'] . '" class="legal" target="_blank"' .
197
-					' rel="noreferrer noopener">' . $link['text'] . '</a>';
196
+				$legalLinks .= $divider.'<a href="'.$link['url'].'" class="legal" target="_blank"'.
197
+					' rel="noreferrer noopener">'.$link['text'].'</a>';
198 198
 				$divider = ' · ';
199 199
 			}
200 200
 		}
201
-		if($legalLinks !== '' ) {
202
-			$footer .= '<br/>' . $legalLinks;
201
+		if ($legalLinks !== '') {
202
+			$footer .= '<br/>'.$legalLinks;
203 203
 		}
204 204
 
205 205
 		return $footer;
@@ -232,16 +232,16 @@  discard block
 block discarded – undo
232 232
 
233 233
 		$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
234 234
 
235
-		if(!$logo || !$logoExists) {
236
-			if($useSvg) {
235
+		if (!$logo || !$logoExists) {
236
+			if ($useSvg) {
237 237
 				$logo = $this->urlGenerator->imagePath('core', 'logo/logo.svg');
238 238
 			} else {
239 239
 				$logo = $this->urlGenerator->imagePath('core', 'logo/logo.png');
240 240
 			}
241
-			return $logo . '?v=' . $cacheBusterCounter;
241
+			return $logo.'?v='.$cacheBusterCounter;
242 242
 		}
243 243
 
244
-		return $this->urlGenerator->linkToRoute('theming.Theming.getImage', [ 'key' => 'logo', 'useSvg' => $useSvg, 'v' => $cacheBusterCounter ]);
244
+		return $this->urlGenerator->linkToRoute('theming.Theming.getImage', ['key' => 'logo', 'useSvg' => $useSvg, 'v' => $cacheBusterCounter]);
245 245
 	}
246 246
 
247 247
 	/**
@@ -279,17 +279,17 @@  discard block
 block discarded – undo
279 279
 	 * @return array scss variables to overwrite
280 280
 	 */
281 281
 	public function getScssVariables() {
282
-		$cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl());
282
+		$cache = $this->cacheFactory->createDistributed('theming-'.$this->urlGenerator->getBaseUrl());
283 283
 		if ($value = $cache->get('getScssVariables')) {
284 284
 			return $value;
285 285
 		}
286 286
 
287 287
 		$variables = [
288
-			'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'",
289
-			'theming-logo-mime' => "'" . $this->config->getAppValue('theming', 'logoMime') . "'",
290
-			'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime') . "'",
291
-			'theming-logoheader-mime' => "'" . $this->config->getAppValue('theming', 'logoheaderMime') . "'",
292
-			'theming-favicon-mime' => "'" . $this->config->getAppValue('theming', 'faviconMime') . "'"
288
+			'theming-cachebuster' => "'".$this->config->getAppValue('theming', 'cachebuster', '0')."'",
289
+			'theming-logo-mime' => "'".$this->config->getAppValue('theming', 'logoMime')."'",
290
+			'theming-background-mime' => "'".$this->config->getAppValue('theming', 'backgroundMime')."'",
291
+			'theming-logoheader-mime' => "'".$this->config->getAppValue('theming', 'logoheaderMime')."'",
292
+			'theming-favicon-mime' => "'".$this->config->getAppValue('theming', 'faviconMime')."'"
293 293
 		];
294 294
 
295 295
 		$variables['image-logo'] = "url('".$this->imageManager->getImageUrl('logo')."')";
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 		}
310 310
 
311 311
 		$variables['has-legal-links'] = 'false';
312
-		if($this->getImprintUrl() !== '' || $this->getPrivacyUrl() !== '') {
312
+		if ($this->getImprintUrl() !== '' || $this->getPrivacyUrl() !== '') {
313 313
 			$variables['has-legal-links'] = 'true';
314 314
 		}
315 315
 
@@ -347,18 +347,18 @@  discard block
 block discarded – undo
347 347
 		if ($image === 'manifest.json') {
348 348
 			try {
349 349
 				$appPath = $this->appManager->getAppPath($app);
350
-				if (file_exists($appPath . '/img/manifest.json')) {
350
+				if (file_exists($appPath.'/img/manifest.json')) {
351 351
 					return false;
352 352
 				}
353 353
 			} catch (AppPathNotFoundException $e) {}
354 354
 			$route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest');
355 355
 		}
356
-		if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) {
356
+		if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT.'/core/img/'.$image)) {
357 357
 			$route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]);
358 358
 		}
359 359
 
360 360
 		if ($route) {
361
-			return $route . '?v=' . $cacheBusterValue;
361
+			return $route.'?v='.$cacheBusterValue;
362 362
 		}
363 363
 
364 364
 		return false;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 	 */
370 370
 	private function increaseCacheBuster() {
371 371
 		$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
372
-		$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
372
+		$this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1);
373 373
 		$this->cacheFactory->createDistributed('theming-')->clear();
374 374
 		$this->cacheFactory->createDistributed('imagePath')->clear();
375 375
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/AppInfo/Application.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$cloudFederationManager = $server->getCloudFederationProviderManager();
53 53
 		$cloudFederationManager->addCloudFederationProvider('file',
54 54
 			'Federated Files Sharing',
55
-			function () use ($container) {
55
+			function() use ($container) {
56 56
 				$server = $container->getServer();
57 57
 				return new CloudFederationProviderFiles(
58 58
 					$server->getAppManager(),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 				);
73 73
 			});
74 74
 
75
-		$container->registerService('RequestHandlerController', function (SimpleContainer $c) use ($server) {
75
+		$container->registerService('RequestHandlerController', function(SimpleContainer $c) use ($server) {
76 76
 			$addressHandler = new AddressHandler(
77 77
 				$server->getURLGenerator(),
78 78
 				$server->getL10N('federatedfilesharing'),
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		
112 112
 		$eventDispatcher->addListener(
113 113
 			'OCA\Files::loadAdditionalScripts',
114
-			function () use ($federatedShareProvider) {
114
+			function() use ($federatedShareProvider) {
115 115
 				if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) {
116 116
 					\OCP\Util::addScript('federatedfilesharing', 'external');
117 117
 				}
Please login to merge, or discard this patch.
lib/private/Security/TrustedDomainHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			return true;
91 91
 		}
92 92
 		// Reject misformed domains in any case
93
-		if (strpos($domain,'-') === 0 || strpos($domain,'..') !== false) {
93
+		if (strpos($domain, '-') === 0 || strpos($domain, '..') !== false) {
94 94
 			return false;
95 95
 		}
96 96
 		// Match, allowing for * wildcards
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 			if (gettype($trusted) !== 'string') {
99 99
 				break;
100 100
 			}
101
-			$regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function ($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i';
101
+			$regex = '/^'.implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))).'$/i';
102 102
 			if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
103 103
 				return true;
104 104
 			}
Please login to merge, or discard this patch.