Passed
Push — master ( 6ce3c5...504e18 )
by John
14:34 queued 13s
created
lib/private/Encryption/Keys/Storage.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 		$this->util = $util;
81 81
 
82 82
 		$this->encryption_base_dir = '/files_encryption';
83
-		$this->keys_base_dir = $this->encryption_base_dir .'/keys';
84
-		$this->backup_base_dir = $this->encryption_base_dir .'/backup';
83
+		$this->keys_base_dir = $this->encryption_base_dir.'/keys';
84
+		$this->backup_base_dir = $this->encryption_base_dir.'/backup';
85 85
 		$this->root_dir = $this->util->getKeyStorageRoot();
86 86
 		$this->crypto = $crypto;
87 87
 		$this->config = $config;
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 	public function getFileKey($path, $keyId, $encryptionModuleId) {
102 102
 		$realFile = $this->util->stripPartialFileExtension($path);
103 103
 		$keyDir = $this->getFileKeyDir($encryptionModuleId, $realFile);
104
-		$key = $this->getKey($keyDir . $keyId)['key'];
104
+		$key = $this->getKey($keyDir.$keyId)['key'];
105 105
 
106 106
 		if ($key === '' && $realFile !== $path) {
107 107
 			// Check if the part file has keys and use them, if no normal keys
108 108
 			// exist. This is required to fix copyBetweenStorage() when we
109 109
 			// rename a .part file over storage borders.
110 110
 			$keyDir = $this->getFileKeyDir($encryptionModuleId, $path);
111
-			$key = $this->getKey($keyDir . $keyId)['key'];
111
+			$key = $this->getKey($keyDir.$keyId)['key'];
112 112
 		}
113 113
 
114 114
 		return base64_decode($key);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function setFileKey($path, $keyId, $key, $encryptionModuleId) {
140 140
 		$keyDir = $this->getFileKeyDir($encryptionModuleId, $path);
141
-		return $this->setKey($keyDir . $keyId, [
141
+		return $this->setKey($keyDir.$keyId, [
142 142
 			'key' => base64_encode($key),
143 143
 		]);
144 144
 	}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function deleteFileKey($path, $keyId, $encryptionModuleId) {
182 182
 		$keyDir = $this->getFileKeyDir($encryptionModuleId, $path);
183
-		return !$this->view->file_exists($keyDir . $keyId) || $this->view->unlink($keyDir . $keyId);
183
+		return !$this->view->file_exists($keyDir.$keyId) || $this->view->unlink($keyDir.$keyId);
184 184
 	}
185 185
 
186 186
 	/**
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	protected function constructUserKeyPath($encryptionModuleId, $keyId, $uid) {
211 211
 		if ($uid === null) {
212
-			$path = $this->root_dir . '/' . $this->encryption_base_dir . '/' . $encryptionModuleId . '/' . $keyId;
212
+			$path = $this->root_dir.'/'.$this->encryption_base_dir.'/'.$encryptionModuleId.'/'.$keyId;
213 213
 		} else {
214
-			$path = $this->root_dir . '/' . $uid . $this->encryption_base_dir . '/'
215
-				. $encryptionModuleId . '/' . $uid . '.' . $keyId;
214
+			$path = $this->root_dir.'/'.$uid.$this->encryption_base_dir.'/'
215
+				. $encryptionModuleId.'/'.$uid.'.'.$keyId;
216 216
 		}
217 217
 
218 218
 		return \OC\Files\Filesystem::normalizePath($path);
@@ -369,12 +369,12 @@  discard block
 block discarded – undo
369 369
 
370 370
 		// in case of system wide mount points the keys are stored directly in the data directory
371 371
 		if ($this->util->isSystemWideMountPoint($filename, $owner)) {
372
-			$keyPath = $this->root_dir . '/' . $this->keys_base_dir . $filename . '/';
372
+			$keyPath = $this->root_dir.'/'.$this->keys_base_dir.$filename.'/';
373 373
 		} else {
374
-			$keyPath = $this->root_dir . '/' . $owner . $this->keys_base_dir . $filename . '/';
374
+			$keyPath = $this->root_dir.'/'.$owner.$this->keys_base_dir.$filename.'/';
375 375
 		}
376 376
 
377
-		return Filesystem::normalizePath($keyPath . $encryptionModuleId . '/', false);
377
+		return Filesystem::normalizePath($keyPath.$encryptionModuleId.'/', false);
378 378
 	}
379 379
 
380 380
 	/**
@@ -429,13 +429,13 @@  discard block
 block discarded – undo
429 429
 	 * @since 12.0.0
430 430
 	 */
431 431
 	public function backupUserKeys($encryptionModuleId, $purpose, $uid) {
432
-		$source = $uid . $this->encryption_base_dir . '/' . $encryptionModuleId;
433
-		$backupDir = $uid . $this->backup_base_dir;
432
+		$source = $uid.$this->encryption_base_dir.'/'.$encryptionModuleId;
433
+		$backupDir = $uid.$this->backup_base_dir;
434 434
 		if (!$this->view->file_exists($backupDir)) {
435 435
 			$this->view->mkdir($backupDir);
436 436
 		}
437 437
 
438
-		$backupDir = $backupDir . '/' . $purpose . '.' . $encryptionModuleId . '.' . $this->getTimestamp();
438
+		$backupDir = $backupDir.'/'.$purpose.'.'.$encryptionModuleId.'.'.$this->getTimestamp();
439 439
 		$this->view->mkdir($backupDir);
440 440
 
441 441
 		return $this->view->copy($source, $backupDir);
@@ -461,9 +461,9 @@  discard block
 block discarded – undo
461 461
 		$systemWideMountPoint = $this->util->isSystemWideMountPoint($relativePath, $owner);
462 462
 
463 463
 		if ($systemWideMountPoint) {
464
-			$systemPath = $this->root_dir . '/' . $this->keys_base_dir . $relativePath . '/';
464
+			$systemPath = $this->root_dir.'/'.$this->keys_base_dir.$relativePath.'/';
465 465
 		} else {
466
-			$systemPath = $this->root_dir . '/' . $owner . $this->keys_base_dir . $relativePath . '/';
466
+			$systemPath = $this->root_dir.'/'.$owner.$this->keys_base_dir.$relativePath.'/';
467 467
 		}
468 468
 
469 469
 		return  Filesystem::normalizePath($systemPath, false);
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 			$sub_dirs = explode('/', ltrim($path, '/'));
481 481
 			$dir = '';
482 482
 			foreach ($sub_dirs as $sub_dir) {
483
-				$dir .= '/' . $sub_dir;
483
+				$dir .= '/'.$sub_dir;
484 484
 				if (!$this->view->is_dir($dir)) {
485 485
 					$this->view->mkdir($dir);
486 486
 				}
Please login to merge, or discard this patch.
lib/private/legacy/OC_API.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -375,7 +375,7 @@
 block discarded – undo
375 375
 		}
376 376
 
377 377
 		foreach ($result->getHeaders() as $name => $value) {
378
-			header($name . ': ' . $value);
378
+			header($name.': '.$value);
379 379
 		}
380 380
 
381 381
 		$meta = $result->getMeta();
Please login to merge, or discard this patch.
lib/private/legacy/OC_FileChunking.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 	public function isComplete() {
86 86
 		$prefix = $this->getPrefix();
87 87
 		$cache = $this->getCache();
88
-		$chunkcount = (int)$this->info['chunkcount'];
88
+		$chunkcount = (int) $this->info['chunkcount'];
89 89
 
90 90
 		for ($i = ($chunkcount - 1); $i >= 0; $i--) {
91 91
 			if (!$cache->hasKey($prefix.$i)) {
Please login to merge, or discard this patch.
lib/private/legacy/OC_Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
 		// Call all slots
104 104
 		foreach (self::$registered[$signalClass][$signalName] as $i) {
105 105
 			try {
106
-				call_user_func([ $i["class"], $i["name"] ], $params);
106
+				call_user_func([$i["class"], $i["name"]], $params);
107 107
 			} catch (Exception $e) {
108 108
 				self::$thrownExceptions[] = $e;
109 109
 				\OC::$server->getLogger()->logException($e);
Please login to merge, or discard this patch.
lib/private/Route/Route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 	 * @return void
150 150
 	 */
151 151
 	public function actionInclude($file) {
152
-		$function = function ($param) use ($file) {
152
+		$function = function($param) use ($file) {
153 153
 			unset($param["_route"]);
154 154
 			$_GET = array_merge($_GET, $param);
155 155
 			unset($param);
Please login to merge, or discard this patch.
lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 		foreach ($policies as $policy) {
96 96
 			header(
97 97
 				sprintf(
98
-					'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;' . $secureCookie . 'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s',
98
+					'Set-Cookie: %snc_sameSiteCookie%s=true; path=%s; httponly;'.$secureCookie.'expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=%s',
99 99
 					$cookiePrefix,
100 100
 					$policy,
101 101
 					$cookieParams['path'],
Please login to merge, or discard this patch.
lib/private/AppFramework/Http.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 			$status = self::STATUS_FOUND;
126 126
 		}
127 127
 
128
-		return $this->protocolVersion . ' ' . $status . ' ' .
128
+		return $this->protocolVersion.' '.$status.' '.
129 129
 			$this->headers[$status];
130 130
 	}
131 131
 }
Please login to merge, or discard this patch.
lib/private/Collaboration/Collaborators/GroupPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$result = ['wide' => [], 'exact' => []];
64 64
 
65 65
 		$groups = $this->groupManager->search($search, $limit, $offset);
66
-		$groupIds = array_map(function (IGroup $group) {
66
+		$groupIds = array_map(function(IGroup $group) {
67 67
 			return $group->getGID();
68 68
 		}, $groups);
69 69
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		if (!empty($groups) && ($this->shareWithGroupOnly || $this->shareeEnumerationInGroupOnly)) {
76 76
 			// Intersect all the groups that match with the groups this user is a member of
77 77
 			$userGroups = $this->groupManager->getUserGroups($this->userSession->getUser());
78
-			$userGroups = array_map(function (IGroup $group) {
78
+			$userGroups = array_map(function(IGroup $group) {
79 79
 				return $group->getGID();
80 80
 			}, $userGroups);
81 81
 			$groupIds = array_intersect($groupIds, $userGroups);
Please login to merge, or discard this patch.
lib/public/AppFramework/ApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		$response = new Response();
87 87
 		$response->addHeader('Access-Control-Allow-Origin', $origin);
88 88
 		$response->addHeader('Access-Control-Allow-Methods', $this->corsMethods);
89
-		$response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge);
89
+		$response->addHeader('Access-Control-Max-Age', (string) $this->corsMaxAge);
90 90
 		$response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders);
91 91
 		$response->addHeader('Access-Control-Allow-Credentials', 'false');
92 92
 		return $response;
Please login to merge, or discard this patch.