Passed
Push — master ( 98fd66...bf4acd )
by Joas
18:11 queued 12s
created
apps/user_status/lib/Service/StatusService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 			return [];
132 132
 		}
133 133
 
134
-		return array_map(function ($status) {
134
+		return array_map(function($status) {
135 135
 			return $this->processStatus($status);
136 136
 		}, $this->mapper->findAll($limit, $offset));
137 137
 	}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 			return [];
150 150
 		}
151 151
 
152
-		return array_map(function ($status) {
152
+		return array_map(function($status) {
153 153
 			return $this->processStatus($status);
154 154
 		}, $this->mapper->findAllRecent($limit, $offset));
155 155
 	}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @return UserStatus[]
169 169
 	 */
170 170
 	public function findByUserIds(array $userIds):array {
171
-		return array_map(function ($status) {
171
+		return array_map(function($status) {
172 172
 			return $this->processStatus($status);
173 173
 		}, $this->mapper->findByUserIds($userIds));
174 174
 	}
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 		// Check if status-type is valid
196 196
 		if (!\in_array($status, self::PRIORITY_ORDERED_STATUSES, true)) {
197
-			throw new InvalidStatusTypeException('Status-type "' . $status . '" is not supported');
197
+			throw new InvalidStatusTypeException('Status-type "'.$status.'" is not supported');
198 198
 		}
199 199
 		if ($statusTimestamp === null) {
200 200
 			$statusTimestamp = $this->timeFactory->getTime();
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		}
236 236
 
237 237
 		if (!$this->predefinedStatusService->isValidId($messageId)) {
238
-			throw new InvalidMessageIdException('Message-Id "' . $messageId . '" is not supported');
238
+			throw new InvalidMessageIdException('Message-Id "'.$messageId.'" is not supported');
239 239
 		}
240 240
 
241 241
 		// Check that clearAt is in the future
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 										 bool $createBackup): void {
270 270
 		// Check if status-type is valid
271 271
 		if (!\in_array($status, self::PRIORITY_ORDERED_STATUSES, true)) {
272
-			throw new InvalidStatusTypeException('Status-type "' . $status . '" is not supported');
272
+			throw new InvalidStatusTypeException('Status-type "'.$status.'" is not supported');
273 273
 		}
274 274
 
275 275
 		if (!$this->predefinedStatusService->isValidId($messageId)) {
276
-			throw new InvalidMessageIdException('Message-Id "' . $messageId . '" is not supported');
276
+			throw new InvalidMessageIdException('Message-Id "'.$messageId.'" is not supported');
277 277
 		}
278 278
 
279 279
 		if ($createBackup) {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 		}
340 340
 		// Check for maximum length of custom message
341 341
 		if (\mb_strlen($message) > self::MAXIMUM_MESSAGE_LENGTH) {
342
-			throw new StatusMessageTooLongException('Message is longer than supported length of ' . self::MAXIMUM_MESSAGE_LENGTH . ' characters');
342
+			throw new StatusMessageTooLongException('Message is longer than supported length of '.self::MAXIMUM_MESSAGE_LENGTH.' characters');
343 343
 		}
344 344
 		// Check that clearAt is in the future
345 345
 		if ($clearAt !== null && $clearAt < $this->timeFactory->getTime()) {
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 		// Get all user statuses and the backups
531 531
 		$findById = $userIds;
532 532
 		foreach ($userIds as $userId) {
533
-			$findById[] = '_' . $userId;
533
+			$findById[] = '_'.$userId;
534 534
 		}
535 535
 		$userStatuses = $this->mapper->findByUserIds($findById);
536 536
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 
548 548
 		// For users with both (normal and backup) delete the status when matching
549 549
 		foreach ($statuesToDelete as $userId => $statusId) {
550
-			$backupUserId = '_' . $userId;
550
+			$backupUserId = '_'.$userId;
551 551
 			if (isset($backups[$backupUserId])) {
552 552
 				$restoreIds[] = $backups[$backupUserId];
553 553
 			}
Please login to merge, or discard this patch.
apps/user_status/lib/Db/UserStatusMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		$qb
102 102
 			->select('*')
103 103
 			->from($this->tableName)
104
-			->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)));
104
+			->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_'.$userId : $userId, IQueryBuilder::PARAM_STR)));
105 105
 
106 106
 		return $this->findEntity($qb);
107 107
 	}
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		$qb = $this->db->getQueryBuilder();
197 197
 		$qb->update($this->tableName)
198 198
 			->set('is_backup', $qb->createNamedParameter(true, IQueryBuilder::PARAM_BOOL))
199
-			->set('user_id', $qb->createNamedParameter('_' . $userId))
199
+			->set('user_id', $qb->createNamedParameter('_'.$userId))
200 200
 			->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));
201 201
 		return $qb->executeStatement() > 0;
202 202
 	}
Please login to merge, or discard this patch.