Completed
Push — master ( 126a82...e45248 )
by Morris
11:37
created
apps/systemtags/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // WARNING: this should be moved to proper AppFramework handling
24 24
 // Check if we are a user
25 25
 if (!\OC::$server->getUserSession()->isLoggedIn()) {
26
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
26
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute(
27 27
 			'core.login.showLoginForm',
28 28
 			[
29 29
 				'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 }
35 35
 // Redirect to 2FA challenge selection if 2FA challenge was not solved yet
36 36
 if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
37
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
37
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38 38
 	exit();
39 39
 }
40 40
 
Please login to merge, or discard this patch.
lib/private/Memcache/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return IMemcache
134 134
 	 */
135 135
 	public function createLocking(string $prefix = ''): IMemcache {
136
-		return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
+		return new $this->lockingCacheClass($this->globalPrefix.'/'.$prefix);
137 137
 	}
138 138
 
139 139
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return ICache
144 144
 	 */
145 145
 	public function createDistributed(string $prefix = ''): ICache {
146
-		return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
+		return new $this->distributedCacheClass($this->globalPrefix.'/'.$prefix);
147 147
 	}
148 148
 
149 149
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return ICache
154 154
 	 */
155 155
 	public function createLocal(string $prefix = ''): ICache {
156
-		return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
+		return new $this->localCacheClass($this->globalPrefix.'/'.$prefix);
157 157
 	}
158 158
 
159 159
 	/**
Please login to merge, or discard this patch.
core/Controller/AvatarController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			if (!($node instanceof File)) {
173 173
 				return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]);
174 174
 			}
175
-			if ($node->getSize() > 20*1024*1024) {
175
+			if ($node->getSize() > 20 * 1024 * 1024) {
176 176
 				return new JSONResponse(
177 177
 					['data' => ['message' => $this->l->t('File is too big')]],
178 178
 					Http::STATUS_BAD_REQUEST
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 				 is_uploaded_file($files['tmp_name'][0]) &&
201 201
 				!\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0])
202 202
 			) {
203
-				if ($files['size'][0] > 20*1024*1024) {
203
+				if ($files['size'][0] > 20 * 1024 * 1024) {
204 204
 					return new JSONResponse(
205 205
 						['data' => ['message' => $this->l->t('File is too big')]],
206 206
 						Http::STATUS_BAD_REQUEST
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 				Http::STATUS_OK,
293 293
 				['Content-Type' => $image->mimeType()]);
294 294
 
295
-		$resp->setETag((string)crc32($image->data()));
295
+		$resp->setETag((string) crc32($image->data()));
296 296
 		$resp->cacheFor(0);
297 297
 		$resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT')));
298 298
 		return $resp;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
 		$image = new \OC_Image();
327 327
 		$image->loadFromData($tmpAvatar);
328
-		$image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h']));
328
+		$image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h']));
329 329
 		try {
330 330
 			$avatar = $this->avatarManager->getAvatar($this->userId);
331 331
 			$avatar->set($image);
Please login to merge, or discard this patch.
lib/private/Collaboration/Collaborators/UserPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 
152 152
 	public function takeOutCurrentUser(array &$users) {
153 153
 		$currentUser = $this->userSession->getUser();
154
-		if(!is_null($currentUser)) {
154
+		if (!is_null($currentUser)) {
155 155
 			if (isset($users[$currentUser->getUID()])) {
156 156
 				unset($users[$currentUser->getUID()]);
157 157
 			}
Please login to merge, or discard this patch.
lib/public/Authentication/TwoFactorAuth/IProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @since 14.0.0
35 35
 	 */
36
-	const EVENT_SUCCESS = self::class . '::success';
37
-	const EVENT_FAILED  = self::class . '::failed';
36
+	const EVENT_SUCCESS = self::class.'::success';
37
+	const EVENT_FAILED  = self::class.'::failed';
38 38
 
39 39
 	/**
40 40
 	 * Get unique identifier of this 2FA provider
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Storage.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 			if ($currentUser) {
115 115
 				$currentUserId = $currentUser->getUID();
116 116
 
117
-				$view = new View($currentUserId . '/files');
117
+				$view = new View($currentUserId.'/files');
118 118
 				$fileInfo = $view->getFileInfo($oldPath);
119 119
 				if ($fileInfo) {
120 120
 					$sourceStorage = $fileInfo->getStorage();
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 			]);
138 138
 		}
139 139
 
140
-		if($fileMovedOutOfSharedFolder) {
141
-			self::$moveOutOfSharedFolder['/' . $currentUserId . '/files' . $oldPath] = true;
140
+		if ($fileMovedOutOfSharedFolder) {
141
+			self::$moveOutOfSharedFolder['/'.$currentUserId.'/files'.$oldPath] = true;
142 142
 		} else {
143 143
 			self::$disableTrash = true;
144 144
 		}
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function unlink($path) {
180 180
 		try {
181
-			if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) {
181
+			if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) {
182 182
 				$result = $this->doDelete($path, 'unlink', true);
183
-				unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]);
183
+				unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]);
184 184
 			} else {
185 185
 				$result = $this->doDelete($path, 'unlink');
186 186
 			}
187 187
 		} catch (GenericEncryptionException $e) {
188 188
 			// in case of a encryption exception we delete the file right away
189 189
 			$this->logger->info(
190
-				"Can't move file" .  $path .
190
+				"Can't move file".$path.
191 191
 				"to the trash bin, therefore it was deleted right away");
192 192
 
193 193
 			$result = $this->storage->unlink($path);
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 	 * @return bool true if the operation succeeded, false otherwise
205 205
 	 */
206 206
 	public function rmdir($path) {
207
-		if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) {
207
+		if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) {
208 208
 			$result = $this->doDelete($path, 'rmdir', true);
209
-			unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]);
209
+			unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]);
210 210
 		} else {
211 211
 			$result = $this->doDelete($path, 'rmdir');
212 212
 		}
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 * @param $path
222 222
 	 * @return bool
223 223
 	 */
224
-	protected function shouldMoveToTrash($path){
224
+	protected function shouldMoveToTrash($path) {
225 225
 
226 226
 		// check if there is a app which want to disable the trash bin for this file
227 227
 		$fileId = $this->storage->getCache()->getId($path);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 			}
235 235
 		}
236 236
 
237
-		$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path);
237
+		$normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path);
238 238
 		$parts = explode('/', $normalized);
239 239
 		if (count($parts) < 4) {
240 240
 			return false;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 			return false;
283 283
 		}
284 284
 
285
-		$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path, true, false, true);
285
+		$normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path, true, false, true);
286 286
 		$result = true;
287 287
 		$view = Filesystem::getView();
288 288
 		if (!isset($this->deletedFiles[$normalized]) && $view instanceof View) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 	 * Setup the storate wrapper callback
311 311
 	 */
312 312
 	public static function setupStorage() {
313
-		\OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function ($mountPoint, $storage) {
313
+		\OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function($mountPoint, $storage) {
314 314
 			return new \OCA\Files_Trashbin\Storage(
315 315
 				array('storage' => $storage, 'mountPoint' => $mountPoint),
316 316
 				\OC::$server->getUserManager(),
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$storedPassword = $share->getPassword();
151 151
 		$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
152 152
 			$this->shareManager->checkPassword($share, $password);
153
-		if (!empty($storedPassword) && !$authenticated ) {
153
+		if (!empty($storedPassword) && !$authenticated) {
154 154
 			$response = new JSONResponse(
155 155
 				['message' => 'No permission to access the share'],
156 156
 				Http::STATUS_BAD_REQUEST
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$httpClient = $this->clientService->newClient();
199 199
 
200 200
 		try {
201
-			$response = $httpClient->post($remote . '/index.php/apps/federatedfilesharing/createFederatedShare',
201
+			$response = $httpClient->post($remote.'/index.php/apps/federatedfilesharing/createFederatedShare',
202 202
 				[
203 203
 					'body' =>
204 204
 						[
Please login to merge, or discard this patch.
apps/federation/lib/TrustedServers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		$client = $this->httpClientService->newClient();
231 231
 		try {
232 232
 			$result = $client->get(
233
-				$url . '/status.php',
233
+				$url.'/status.php',
234 234
 				[
235 235
 					'timeout' => 3,
236 236
 					'connect_timeout' => 3,
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 
287 287
 		}
288 288
 
289
-		return 'https://' . $url;
289
+		return 'https://'.$url;
290 290
 	}
291 291
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Service/StoragesService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,17 +72,17 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	protected function getStorageConfigFromDBMount(array $mount) {
75
-		$applicableUsers = array_filter($mount['applicable'], function ($applicable) {
75
+		$applicableUsers = array_filter($mount['applicable'], function($applicable) {
76 76
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_USER;
77 77
 		});
78
-		$applicableUsers = array_map(function ($applicable) {
78
+		$applicableUsers = array_map(function($applicable) {
79 79
 			return $applicable['value'];
80 80
 		}, $applicableUsers);
81 81
 
82
-		$applicableGroups = array_filter($mount['applicable'], function ($applicable) {
82
+		$applicableGroups = array_filter($mount['applicable'], function($applicable) {
83 83
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_GROUP;
84 84
 		});
85
-		$applicableGroups = array_map(function ($applicable) {
85
+		$applicableGroups = array_map(function($applicable) {
86 86
 			return $applicable['value'];
87 87
 		}, $applicableGroups);
88 88
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 				$mount['priority']
99 99
 			);
100 100
 			$config->setType($mount['type']);
101
-			$config->setId((int)$mount['mount_id']);
101
+			$config->setId((int) $mount['mount_id']);
102 102
 			return $config;
103 103
 		} catch (\UnexpectedValueException $e) {
104 104
 			// don't die if a storage backend doesn't exist
@@ -126,11 +126,11 @@  discard block
 block discarded – undo
126 126
 	protected function readConfig() {
127 127
 		$mounts = $this->readDBConfig();
128 128
 		$configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts);
129
-		$configs = array_filter($configs, function ($config) {
129
+		$configs = array_filter($configs, function($config) {
130 130
 			return $config instanceof StorageConfig;
131 131
 		});
132 132
 
133
-		$keys = array_map(function (StorageConfig $config) {
133
+		$keys = array_map(function(StorageConfig $config) {
134 134
 			return $config->getId();
135 135
 		}, $configs);
136 136
 
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 		$mount = $this->dbConfig->getMountById($id);
150 150
 
151 151
 		if (!is_array($mount)) {
152
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
152
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
153 153
 		}
154 154
 
155 155
 		$config = $this->getStorageConfigFromDBMount($mount);
156 156
 		if ($this->isApplicable($config)) {
157 157
 			return $config;
158 158
 		} else {
159
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
159
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
160 160
 		}
161 161
 	}
162 162
 
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
 		$existingMount = $this->dbConfig->getMountById($id);
380 380
 
381 381
 		if (!is_array($existingMount)) {
382
-			throw new NotFoundException('Storage with ID "' . $id . '" not found while updating storage');
382
+			throw new NotFoundException('Storage with ID "'.$id.'" not found while updating storage');
383 383
 		}
384 384
 
385 385
 		$oldStorage = $this->getStorageConfigFromDBMount($existingMount);
386 386
 
387 387
 		if ($oldStorage->getBackend() instanceof InvalidBackend) {
388
-			throw new NotFoundException('Storage with id "' . $id . '" cannot be edited due to missing backend');
388
+			throw new NotFoundException('Storage with id "'.$id.'" cannot be edited due to missing backend');
389 389
 		}
390 390
 
391 391
 		$removedUsers = array_diff($oldStorage->getApplicableUsers(), $updatedStorage->getApplicableUsers());
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		$existingMount = $this->dbConfig->getMountById($id);
463 463
 
464 464
 		if (!is_array($existingMount)) {
465
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
465
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
466 466
 		}
467 467
 
468 468
 		$this->dbConfig->removeMount($id);
Please login to merge, or discard this patch.