Completed
Push — master ( 18d0f3...d0e25a )
by
unknown
31:22
created
lib/private/Preview/PreviewService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 			$qb->select('id', 'file_id', 'storage_id')
52 52
 				->from($this->previewMapper->getTableName(), 'p1')
53
-				->innerJoin('p1', $qb->createFunction('(' . $maxQb->getSQL() . ')'), 'p2', $qb->expr()->eq('p1.id', 'p2.max_id'))
53
+				->innerJoin('p1', $qb->createFunction('('.$maxQb->getSQL().')'), 'p2', $qb->expr()->eq('p1.id', 'p2.max_id'))
54 54
 				->setMaxResults(1000);
55 55
 
56 56
 			$result = $qb->executeQuery();
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 			// Previews next to each others in the database are likely in the same storage, so group them
64 64
 			while ($row = $result->fetch()) {
65 65
 				$found = true;
66
-				if ($lastStorageId !== (int)$row['storage_id']) {
66
+				if ($lastStorageId !== (int) $row['storage_id']) {
67 67
 					if ($lastStorageId !== -1) {
68 68
 						yield ['storageId' => $lastStorageId, 'fileIds' => $fileIds];
69 69
 						$fileIds = [];
70 70
 					}
71
-					$lastStorageId = (int)$row['storage_id'];
71
+					$lastStorageId = (int) $row['storage_id'];
72 72
 				}
73
-				$fileIds[] = (int)$row['file_id'];
73
+				$fileIds[] = (int) $row['file_id'];
74 74
 				$lastId = $row['id'];
75 75
 			}
76 76
 
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	}
86 86
 
87 87
 	public function addSelect(...$select) {
88
-		$select = array_map(function ($select) {
88
+		$select = array_map(function($select) {
89 89
 			return ['select' => $select, 'alias' => null];
90 90
 		}, $select);
91 91
 		$this->selects = array_merge($this->selects, $select);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 * @param string|IQueryFunction $column
106 106
 	 * @return void
107 107
 	 */
108
-	private function ensureSelect(string|IQueryFunction $column, ?string $alias = null): void {
108
+	private function ensureSelect(string | IQueryFunction $column, ?string $alias = null): void {
109 109
 		$checkColumn = $alias ?: $column;
110 110
 		if (str_contains($checkColumn, '.')) {
111 111
 			[$table, $checkColumn] = explode('.', $checkColumn);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			if (str_starts_with($fromPartition->name, 'from_')) {
253 253
 				$partitionName = $fromPartition->name;
254 254
 			} else {
255
-				$partitionName = 'from_' . $fromPartition->name;
255
+				$partitionName = 'from_'.$fromPartition->name;
256 256
 			}
257 257
 
258 258
 			if (!isset($this->splitQueries[$partitionName])) {
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
 		$partitionPredicates = [];
323 323
 		foreach ($predicates as $predicate) {
324
-			$partition = $this->getPartitionForPredicate((string)$predicate);
324
+			$partition = $this->getPartitionForPredicate((string) $predicate);
325 325
 			if ($this->mainPartition === $partition) {
326 326
 				$partitionPredicates[''][] = $predicate;
327 327
 			} elseif ($partition) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 
350 350
 						$column = $this->quoteHelper->quoteColumnName($this->splitQueries[$alias]->joinToColumn);
351 351
 						foreach ($predicates as $predicate) {
352
-							if ((string)$predicate === "$column IS NULL") {
352
+							if ((string) $predicate === "$column IS NULL") {
353 353
 								$this->splitQueries[$alias]->joinMode = PartitionQuery::JOIN_MODE_LEFT_NULL;
354 354
 							} else {
355 355
 								$this->splitQueries[$alias]->query->andWhere($predicate);
@@ -394,14 +394,14 @@  discard block
 block discarded – undo
394 394
 
395 395
 	public function setMaxResults($maxResults) {
396 396
 		if ($maxResults > 0) {
397
-			$this->limit = (int)$maxResults;
397
+			$this->limit = (int) $maxResults;
398 398
 		}
399 399
 		return parent::setMaxResults($maxResults);
400 400
 	}
401 401
 
402 402
 	public function setFirstResult($firstResult) {
403 403
 		if ($firstResult > 0) {
404
-			$this->offset = (int)$firstResult;
404
+			$this->offset = (int) $firstResult;
405 405
 		}
406 406
 		return parent::setFirstResult($firstResult);
407 407
 	}
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 			$split->query->setParameters($this->getParameters(), $this->getParameterTypes());
416 416
 		}
417 417
 		if (count($this->splitQueries) > 0) {
418
-			$hasNonLeftJoins = array_reduce($this->splitQueries, function (bool $hasNonLeftJoins, PartitionQuery $query) {
418
+			$hasNonLeftJoins = array_reduce($this->splitQueries, function(bool $hasNonLeftJoins, PartitionQuery $query) {
419 419
 				return $hasNonLeftJoins || $query->joinMode !== PartitionQuery::JOIN_MODE_LEFT;
420 420
 			}, false);
421 421
 			if ($hasNonLeftJoins) {
Please login to merge, or discard this patch.