Passed
Push — master ( c2dddf...46e6c4 )
by Joas
14:48 queued 13s
created
apps/dav/lib/CardDAV/AddressBookImpl.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		$update = false;
136 136
 		if (!isset($properties['URI'])) { // create a new contact
137 137
 			$uid = $this->createUid();
138
-			$uri = $uid . '.vcf';
138
+			$uri = $uid.'.vcf';
139 139
 			$vCard = $this->createEmptyVCard($uid);
140 140
 		} else { // update existing contact
141 141
 			$uri = $properties['URI'];
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	protected function createUid() {
211 211
 		do {
212 212
 			$uid = $this->getUid();
213
-			$contact = $this->backend->getContact($this->getKey(), $uid . '.vcf');
213
+			$contact = $this->backend->getContact($this->getKey(), $uid.'.vcf');
214 214
 		} while (!empty($contact));
215 215
 
216 216
 		return $uid;
@@ -251,15 +251,15 @@  discard block
 block discarded – undo
251 251
 		foreach ($vCard->children() as $property) {
252 252
 			if ($property->name === 'PHOTO' && $property->getValueType() === 'BINARY') {
253 253
 				$url = $this->urlGenerator->getAbsoluteURL(
254
-					$this->urlGenerator->linkTo('', 'remote.php') . '/dav/');
254
+					$this->urlGenerator->linkTo('', 'remote.php').'/dav/');
255 255
 				$url .= implode('/', [
256 256
 					'addressbooks',
257 257
 					substr($this->addressBookInfo['principaluri'], 11), //cut off 'principals/'
258 258
 					$this->addressBookInfo['uri'],
259 259
 					$uri
260
-				]) . '?photo';
260
+				]).'?photo';
261 261
 
262
-				$result['PHOTO'] = 'VALUE=uri:' . $url;
262
+				$result['PHOTO'] = 'VALUE=uri:'.$url;
263 263
 			} elseif (in_array($property->name, ['URL', 'GEO', 'CLOUD', 'ADR', 'EMAIL', 'IMPP', 'TEL', 'X-SOCIALPROFILE', 'RELATED', 'LANG', 'X-ADDRESSBOOKSERVER-MEMBER'])) {
264 264
 				if (!isset($result[$property->name])) {
265 265
 					$result[$property->name] = [];
Please login to merge, or discard this patch.
apps/dav/lib/CardDAV/HasPhotoPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		$ns = '{http://nextcloud.com/ns}';
61 61
 
62 62
 		if ($node instanceof Card) {
63
-			$propFind->handle($ns . 'has-photo', function () use ($node) {
63
+			$propFind->handle($ns.'has-photo', function() use ($node) {
64 64
 				$vcard = Reader::read($node->get());
65 65
 				return $vcard instanceof VCard
66 66
 					&& $vcard->PHOTO
Please login to merge, or discard this patch.
lib/private/Preview/BackgroundCleanupJob.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function run($argument) {
65 65
 		foreach ($this->getDeletedFiles() as $fileId) {
66 66
 			try {
67
-				$preview = $this->previewFolder->getFolder((string)$fileId);
67
+				$preview = $this->previewFolder->getFolder((string) $fileId);
68 68
 				$preview->delete();
69 69
 			} catch (NotFoundException $e) {
70 70
 				// continue
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		 * We take the md5 of the name (fileid) and split the first 7 chars. That way
126 126
 		 * there are not a gazillion files in the root of the preview appdata.
127 127
 		 */
128
-		$like = $this->connection->escapeLikeParameter($data['path']) . '/_/_/_/_/_/_/_/%';
128
+		$like = $this->connection->escapeLikeParameter($data['path']).'/_/_/_/_/_/_/_/%';
129 129
 
130 130
 		$qb = $this->connection->getQueryBuilder();
131 131
 		$qb->select('a.name')
Please login to merge, or discard this patch.
lib/private/Files/Storage/Wrapper/Encryption.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	public function getDirectoryContent($directory): \Traversable {
206 206
 		$parent = rtrim($directory, '/');
207 207
 		foreach ($this->getWrapperStorage()->getDirectoryContent($directory) as $data) {
208
-			yield $this->modifyMetaData($parent . '/' . $data['name'], $data);
208
+			yield $this->modifyMetaData($parent.'/'.$data['name'], $data);
209 209
 		}
210 210
 	}
211 211
 
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
 		// check if the file is stored in the array cache, this means that we
378 378
 		// copy a file over to the versions folder, in this case we don't want to
379 379
 		// decrypt it
380
-		if ($this->arrayCache->hasKey('encryption_copy_version_' . $path)) {
381
-			$this->arrayCache->remove('encryption_copy_version_' . $path);
380
+		if ($this->arrayCache->hasKey('encryption_copy_version_'.$path)) {
381
+			$this->arrayCache->remove('encryption_copy_version_'.$path);
382 382
 			return $this->storage->fopen($path, $mode);
383 383
 		}
384 384
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 				}
452 452
 			} catch (ModuleDoesNotExistsException $e) {
453 453
 				$this->logger->logException($e, [
454
-					'message' => 'Encryption module "' . $encryptionModuleId . '" not found, file will be stored unencrypted',
454
+					'message' => 'Encryption module "'.$encryptionModuleId.'" not found, file will be stored unencrypted',
455 455
 					'level' => ILogger::WARN,
456 456
 					'app' => 'core',
457 457
 				]);
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 				try {
505 505
 					$result = $this->fixUnencryptedSize($path, $size, $unencryptedSize);
506 506
 				} catch (\Exception $e) {
507
-					$this->logger->error('Couldn\'t re-calculate unencrypted size for ' . $path);
507
+					$this->logger->error('Couldn\'t re-calculate unencrypted size for '.$path);
508 508
 					$this->logger->logException($e);
509 509
 				}
510 510
 				unset($this->fixUnencryptedSizeOf[$this->getFullPath($path)]);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 
533 533
 		// if we couldn't open the file we return the old unencrypted size
534 534
 		if (!is_resource($stream)) {
535
-			$this->logger->error('Could not open ' . $path . '. Recalculation of unencrypted size aborted.');
535
+			$this->logger->error('Could not open '.$path.'. Recalculation of unencrypted size aborted.');
536 536
 			return $unencryptedSize;
537 537
 		}
538 538
 
@@ -582,8 +582,8 @@  discard block
 block discarded – undo
582 582
 
583 583
 		// we have to decrypt the last chunk to get it actual size
584 584
 		$encryptionModule->begin($this->getFullPath($path), $this->uid, 'r', $header, []);
585
-		$decryptedLastChunk = $encryptionModule->decrypt($lastChunkContentEncrypted, $lastChunkNr . 'end');
586
-		$decryptedLastChunk .= $encryptionModule->end($this->getFullPath($path), $lastChunkNr . 'end');
585
+		$decryptedLastChunk = $encryptionModule->decrypt($lastChunkContentEncrypted, $lastChunkNr.'end');
586
+		$decryptedLastChunk .= $encryptionModule->end($this->getFullPath($path), $lastChunkNr.'end');
587 587
 
588 588
 		// calc the real file size with the size of the last chunk
589 589
 		$newUnencryptedSize += strlen($decryptedLastChunk);
@@ -711,9 +711,9 @@  discard block
 block discarded – undo
711 711
 			// remember that we try to create a version so that we can detect it during
712 712
 			// fopen($sourceInternalPath) and by-pass the encryption in order to
713 713
 			// create a 1:1 copy of the file
714
-			$this->arrayCache->set('encryption_copy_version_' . $sourceInternalPath, true);
714
+			$this->arrayCache->set('encryption_copy_version_'.$sourceInternalPath, true);
715 715
 			$result = $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
716
-			$this->arrayCache->remove('encryption_copy_version_' . $sourceInternalPath);
716
+			$this->arrayCache->remove('encryption_copy_version_'.$sourceInternalPath);
717 717
 			if ($result) {
718 718
 				$info = $this->getCache('', $sourceStorage)->get($sourceInternalPath);
719 719
 				// make sure that we update the unencrypted size for the version
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 		$mount = $this->mountManager->findByStorageId($sourceStorage->getId());
734 734
 		if (count($mount) === 1) {
735 735
 			$mountPoint = $mount[0]->getMountPoint();
736
-			$source = $mountPoint . '/' . $sourceInternalPath;
736
+			$source = $mountPoint.'/'.$sourceInternalPath;
737 737
 			$target = $this->getFullPath($targetInternalPath);
738 738
 			$this->copyKeys($source, $target);
739 739
 		} else {
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
 			if (is_resource($dh)) {
747 747
 				while ($result and ($file = readdir($dh)) !== false) {
748 748
 					if (!Filesystem::isIgnoredDir($file)) {
749
-						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename);
749
+						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file, false, $isRename);
750 750
 					}
751 751
 				}
752 752
 			}
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
 				$this->getCache()->remove($targetInternalPath);
775 775
 			}
776 776
 		}
777
-		return (bool)$result;
777
+		return (bool) $result;
778 778
 	}
779 779
 
780 780
 	/**
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
 	 * @return string full path including mount point
845 845
 	 */
846 846
 	protected function getFullPath($path) {
847
-		return Filesystem::normalizePath($this->mountPoint . '/' . $path);
847
+		return Filesystem::normalizePath($this->mountPoint.'/'.$path);
848 848
 	}
849 849
 
850 850
 	/**
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
 			try {
964 964
 				$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
965 965
 			} catch (ModuleDoesNotExistsException $e) {
966
-				$this->logger->critical('Encryption module defined in "' . $path . '" not loaded!');
966
+				$this->logger->critical('Encryption module defined in "'.$path.'" not loaded!');
967 967
 				throw $e;
968 968
 			}
969 969
 		}
Please login to merge, or discard this patch.
lib/public/AppFramework/AuthPublicShareController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 		if (substr($class, -10) === 'Controller') {
169 169
 			$class = substr($class, 0, -10);
170 170
 		}
171
-		return $app .'.'. $class .'.'. $function;
171
+		return $app.'.'.$class.'.'.$function;
172 172
 	}
173 173
 
174 174
 	/**
Please login to merge, or discard this patch.
apps/user_ldap/lib/Mapping/UserMapping.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
 	 */
36 36
 	protected function getTableName(bool $includePrefix = true) {
37 37
 		$p = $includePrefix ? '*PREFIX*' : '';
38
-		return $p . 'ldap_user_mapping';
38
+		return $p.'ldap_user_mapping';
39 39
 	}
40 40
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Mapping/GroupMapping.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
 	 */
36 36
 	protected function getTableName(bool $includePrefix = true) {
37 37
 		$p = $includePrefix ? '*PREFIX*' : '';
38
-		return $p . 'ldap_group_mapping';
38
+		return $p.'ldap_group_mapping';
39 39
 	}
40 40
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Proxy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @return string
108 108
 	 */
109 109
 	protected function getUserCacheKey($uid) {
110
-		return 'user-' . $uid . '-lastSeenOn';
110
+		return 'user-'.$uid.'-lastSeenOn';
111 111
 	}
112 112
 
113 113
 	/**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @return string
116 116
 	 */
117 117
 	protected function getGroupCacheKey($gid) {
118
-		return 'group-' . $gid . '-lastSeenOn';
118
+		return 'group-'.$gid.'-lastSeenOn';
119 119
 	}
120 120
 
121 121
 	/**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		if ($key === null) {
179 179
 			return $prefix;
180 180
 		}
181
-		return $prefix . hash('sha256', $key);
181
+		return $prefix.hash('sha256', $key);
182 182
 	}
183 183
 
184 184
 	/**
Please login to merge, or discard this patch.
core/Controller/SvgController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return DataDisplayResponse|NotFoundResponse
82 82
 	 */
83 83
 	public function getSvgFromCore(string $folder, string $fileName, string $color = 'ffffff') {
84
-		$path = $this->serverRoot . "/core/img/$folder/$fileName.svg";
84
+		$path = $this->serverRoot."/core/img/$folder/$fileName.svg";
85 85
 		return $this->getSvg($path, $color, $fileName);
86 86
 	}
87 87
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			return new NotFoundResponse();
105 105
 		}
106 106
 
107
-		$path = $appPath . "/img/$fileName.svg";
107
+		$path = $appPath."/img/$fileName.svg";
108 108
 		return $this->getSvg($path, $color, $fileName);
109 109
 	}
110 110
 
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
 		// Set cache control
135 135
 		$ttl = 31536000;
136 136
 		$response->cacheFor($ttl);
137
-		$response->addHeader('Content-Disposition', 'inline; filename="' . $fileName . '.svg"');
137
+		$response->addHeader('Content-Disposition', 'inline; filename="'.$fileName.'.svg"');
138 138
 		$expires = new \DateTime();
139 139
 		$expires->setTimestamp($this->timeFactory->getTime());
140
-		$expires->add(new \DateInterval('PT' . $ttl . 'S'));
140
+		$expires->add(new \DateInterval('PT'.$ttl.'S'));
141 141
 		$response->addHeader('Expires', $expires->format(\DateTime::RFC1123));
142 142
 		$response->addHeader('Pragma', 'cache');
143 143
 
Please login to merge, or discard this patch.