Completed
Push — master ( 445cce...52a994 )
by John
20:56
created
tests/lib/Snowflake/GeneratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 		$data = $this->decoder->decode($generator->nextId());
58 58
 
59 59
 		$this->assertEquals($expectedSeconds, ($data['createdAt']->format('U') - IGenerator::TS_OFFSET));
60
-		$this->assertEquals($expectedMilliseconds, (int)$data['createdAt']->format('v'));
60
+		$this->assertEquals($expectedMilliseconds, (int) $data['createdAt']->format('v'));
61 61
 	}
62 62
 
63 63
 	public static function provideSnowflakeData(): array {
Please login to merge, or discard this patch.
tests/lib/Snowflake/DecoderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	): void {
32 32
 		$data = $this->decoder->decode($snowflakeId);
33 33
 
34
-		$this->assertEquals($timestamp, (float)$data['createdAt']->format('U.v'));
34
+		$this->assertEquals($timestamp, (float) $data['createdAt']->format('U.v'));
35 35
 		$this->assertEquals($serverId, $data['serverId']);
36 36
 		$this->assertEquals($sequenceId, $data['sequenceId']);
37 37
 		$this->assertEquals($isCli, $data['isCli']);
Please login to merge, or discard this patch.
core/Migrations/Version33000Date20251023120529.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 			// Iterate over all the rows with duplicated rows
55 55
 			$id = $row['id'];
56 56
 
57
-			if (isset($set[$row['bucket_name'] . '_' . $row['object_store_name']])) {
57
+			if (isset($set[$row['bucket_name'].'_'.$row['object_store_name']])) {
58 58
 				// duplicate
59
-				$authoritativeId = $set[$row['bucket_name'] . '_' . $row['object_store_name']];
59
+				$authoritativeId = $set[$row['bucket_name'].'_'.$row['object_store_name']];
60 60
 				$qb = $this->connection->getQueryBuilder();
61 61
 				$qb->select('id')
62 62
 					->from('preview_locations')
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 				}
81 81
 				break;
82 82
 			}
83
-			$set[$row['bucket_name'] . '_' . $row['object_store_name']] = $row['id'];
83
+			$set[$row['bucket_name'].'_'.$row['object_store_name']] = $row['id'];
84 84
 		}
85 85
 	}
86 86
 }
Please login to merge, or discard this patch.
core/BackgroundJobs/MovePreviewJob.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		$this->appData = $appDataFactory->get('preview');
54 54
 		$this->setTimeSensitivity(self::TIME_INSENSITIVE);
55 55
 		$this->setInterval(24 * 60 * 60);
56
-		$this->previewRootPath = 'appdata_' . $this->config->getSystemValueString('instanceid') . '/preview/';
56
+		$this->previewRootPath = 'appdata_'.$this->config->getSystemValueString('instanceid').'/preview/';
57 57
 	}
58 58
 
59 59
 	#[Override]
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 			$qb->select('path')
69 69
 				->from('filecache')
70 70
 				// Hierarchical preview folder structure
71
-				->where($qb->expr()->like('path', $qb->createNamedParameter($this->previewRootPath . '%/%/%/%/%/%/%/%/%')))
71
+				->where($qb->expr()->like('path', $qb->createNamedParameter($this->previewRootPath.'%/%/%/%/%/%/%/%/%')))
72 72
 				// Legacy flat preview folder structure
73
-				->orWhere($qb->expr()->like('path', $qb->createNamedParameter($this->previewRootPath . '%/%.%')))
73
+				->orWhere($qb->expr()->like('path', $qb->createNamedParameter($this->previewRootPath.'%/%.%')))
74 74
 				->hintShardKey('storage', $this->rootFolder->getMountPoint()->getNumericStorageId())
75 75
 				->setMaxResults(100);
76 76
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		while ($row = $result->fetch()) {
98 98
 			$pathSplit = explode('/', $row['path']);
99 99
 			assert(count($pathSplit) >= 2);
100
-			$fileId = (int)$pathSplit[count($pathSplit) - 2];
100
+			$fileId = (int) $pathSplit[count($pathSplit) - 2];
101 101
 			if (count($pathSplit) === 11) {
102 102
 				// Hierarchical structure
103 103
 				if (!in_array($fileId, $fileIds)) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * @param array<string|int, string[]> $previewFolders
127 127
 	 */
128 128
 	private function processPreviews(int $fileId, bool $flatPath): void {
129
-		$internalPath = $this->getInternalFolder((string)$fileId, $flatPath);
129
+		$internalPath = $this->getInternalFolder((string) $fileId, $flatPath);
130 130
 		$folder = $this->appData->getFolder($internalPath);
131 131
 
132 132
 		/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		$previewFiles = [];
136 136
 
137 137
 		foreach ($folder->getDirectoryListing() as $previewFile) {
138
-			$path = $fileId . '/' . $previewFile->getName();
138
+			$path = $fileId.'/'.$previewFile->getName();
139 139
 			/** @var SimpleFile $previewFile */
140 140
 			$preview = Preview::fromPath($path, $this->mimeTypeDetector);
141 141
 			$preview->setId($this->generator->nextId());
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 				$file = $previewFile['file'];
172 172
 				$preview->setStorageId($result[0]['storage']);
173 173
 				$preview->setEtag($result[0]['etag']);
174
-				$preview->setSourceMimeType($this->mimeTypeLoader->getMimetypeById((int)$result[0]['mimetype']));
174
+				$preview->setSourceMimeType($this->mimeTypeLoader->getMimetypeById((int) $result[0]['mimetype']));
175 175
 				try {
176 176
 					$preview = $this->previewMapper->insert($preview);
177 177
 				} catch (Exception) {
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
 		if ($flatPath) {
219 219
 			return $name;
220 220
 		}
221
-		return implode('/', str_split(substr(md5($name), 0, 7))) . '/' . $name;
221
+		return implode('/', str_split(substr(md5($name), 0, 7))).'/'.$name;
222 222
 	}
223 223
 
224 224
 	private function deleteFolder(string $path): void {
225 225
 		$current = $path;
226 226
 
227 227
 		while (true) {
228
-			$appDataPath = $this->previewRootPath . $current;
228
+			$appDataPath = $this->previewRootPath.$current;
229 229
 			$qb = $this->connection->getQueryBuilder();
230 230
 			$qb->delete('filecache')
231 231
 				->where($qb->expr()->eq('path_hash', $qb->createNamedParameter(md5($appDataPath))))
Please login to merge, or discard this patch.