Completed
Push — master ( 262ff1...b88ab7 )
by Morris
22:32
created
lib/private/Comments/Manager.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
 	 * @return array
88 88
 	 */
89 89
 	protected function normalizeDatabaseData(array $data) {
90
-		$data['id'] = (string)$data['id'];
91
-		$data['parent_id'] = (string)$data['parent_id'];
92
-		$data['topmost_parent_id'] = (string)$data['topmost_parent_id'];
90
+		$data['id'] = (string) $data['id'];
91
+		$data['parent_id'] = (string) $data['parent_id'];
92
+		$data['topmost_parent_id'] = (string) $data['topmost_parent_id'];
93 93
 		$data['creation_timestamp'] = new \DateTime($data['creation_timestamp']);
94 94
 		if (!is_null($data['latest_child_timestamp'])) {
95 95
 			$data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']);
96 96
 		}
97
-		$data['children_count'] = (int)$data['children_count'];
97
+		$data['children_count'] = (int) $data['children_count'];
98 98
 		return $data;
99 99
 	}
100 100
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	protected function updateChildrenInformation($id, \DateTime $cDateTime) {
165 165
 		$qb = $this->dbConn->getQueryBuilder();
166
-		$query = $qb->select($qb->createFunction('COUNT(' . $qb->getColumnName('id') . ')'))
166
+		$query = $qb->select($qb->createFunction('COUNT('.$qb->getColumnName('id').')'))
167 167
 			->from('comments')
168 168
 			->where($qb->expr()->eq('parent_id', $qb->createParameter('id')))
169 169
 			->setParameter('id', $id);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$resultStatement = $query->execute();
172 172
 		$data = $resultStatement->fetch(\PDO::FETCH_NUM);
173 173
 		$resultStatement->closeCursor();
174
-		$children = (int)$data[0];
174
+		$children = (int) $data[0];
175 175
 
176 176
 		$comment = $this->get($id);
177 177
 		$comment->setChildrenCount($children);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 			!is_string($type) || empty($type)
194 194
 			|| !is_string($id) || empty($id)
195 195
 		) {
196
-			throw new \InvalidArgumentException($role . ' parameters must be string and not empty');
196
+			throw new \InvalidArgumentException($role.' parameters must be string and not empty');
197 197
 		}
198 198
 	}
199 199
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		if (empty($id)) {
208 208
 			return;
209 209
 		}
210
-		$this->commentsCache[(string)$id] = $comment;
210
+		$this->commentsCache[(string) $id] = $comment;
211 211
 	}
212 212
 
213 213
 	/**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @param mixed $id the comment's id
217 217
 	 */
218 218
 	protected function uncache($id) {
219
-		$id = (string)$id;
219
+		$id = (string) $id;
220 220
 		if (isset($this->commentsCache[$id])) {
221 221
 			unset($this->commentsCache[$id]);
222 222
 		}
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * @since 9.0.0
233 233
 	 */
234 234
 	public function get($id) {
235
-		if ((int)$id === 0) {
235
+		if ((int) $id === 0) {
236 236
 			throw new \InvalidArgumentException('IDs must be translatable to a number in this implementation.');
237 237
 		}
238 238
 
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 		$query->select('*')
511 511
 			->from('comments')
512 512
 			->where($query->expr()->iLike('message', $query->createNamedParameter(
513
-				'%' . $this->dbConn->escapeLikeParameter($search). '%'
513
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
514 514
 			)))
515 515
 			->orderBy('creation_timestamp', 'DESC')
516 516
 			->addOrderBy('id', 'DESC')
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 	 */
553 553
 	public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') {
554 554
 		$qb = $this->dbConn->getQueryBuilder();
555
-		$query = $qb->select($qb->createFunction('COUNT(' . $qb->getColumnName('id') . ')'))
555
+		$query = $qb->select($qb->createFunction('COUNT('.$qb->getColumnName('id').')'))
556 556
 			->from('comments')
557 557
 			->where($qb->expr()->eq('object_type', $qb->createParameter('type')))
558 558
 			->andWhere($qb->expr()->eq('object_id', $qb->createParameter('id')))
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 		$resultStatement = $query->execute();
573 573
 		$data = $resultStatement->fetch(\PDO::FETCH_NUM);
574 574
 		$resultStatement->closeCursor();
575
-		return (int)$data[0];
575
+		return (int) $data[0];
576 576
 	}
577 577
 
578 578
 	/**
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		$qb = $this->dbConn->getQueryBuilder();
587 587
 		$query = $qb->select('f.fileid')
588 588
 			->selectAlias(
589
-				$qb->createFunction('COUNT(' . $qb->getColumnName('c.id') . ')'),
589
+				$qb->createFunction('COUNT('.$qb->getColumnName('c.id').')'),
590 590
 				'num_ids'
591 591
 			)
592 592
 			->from('comments', 'c')
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 			->execute();
740 740
 
741 741
 		if ($affectedRows > 0) {
742
-			$comment->setId((string)$qb->getLastInsertId());
742
+			$comment->setId((string) $qb->getLastInsertId());
743 743
 			$this->sendEvent(CommentsEvent::EVENT_ADD, $comment);
744 744
 		}
745 745
 
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 		if (!isset($this->displayNameResolvers[$type])) {
1020 1020
 			throw new \OutOfBoundsException('No Displayname resolver for this type registered');
1021 1021
 		}
1022
-		return (string)$this->displayNameResolvers[$type]($id);
1022
+		return (string) $this->displayNameResolvers[$type]($id);
1023 1023
 	}
1024 1024
 
1025 1025
 	/**
Please login to merge, or discard this patch.
lib/private/User/Manager.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	public function __construct(IConfig $config) {
80 80
 		$this->config = $config;
81 81
 		$cachedUsers = &$this->cachedUsers;
82
-		$this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) {
82
+		$this->listen('\OC\User', 'postDelete', function($user) use (&$cachedUsers) {
83 83
 			/** @var \OC\User\User $user */
84 84
 			unset($cachedUsers[$user->getUID()]);
85 85
 		});
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		$result = $this->checkPasswordNoLogging($loginName, $password);
186 186
 
187 187
 		if ($result === false) {
188
-			\OC::$server->getLogger()->warning('Login failed: \''. $loginName .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). '\')', ['app' => 'core']);
188
+			\OC::$server->getLogger()->warning('Login failed: \''.$loginName.'\' (Remote IP: \''.\OC::$server->getRequest()->getRemoteAddress().'\')', ['app' => 'core']);
189 189
 		}
190 190
 
191 191
 		return $result;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 			}
235 235
 		}
236 236
 
237
-		uasort($users, function ($a, $b) {
237
+		uasort($users, function($a, $b) {
238 238
 			/**
239 239
 			 * @var \OC\User\User $a
240 240
 			 * @var \OC\User\User $b
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 			}
264 264
 		}
265 265
 
266
-		usort($users, function ($a, $b) {
266
+		usort($users, function($a, $b) {
267 267
 			/**
268 268
 			 * @var \OC\User\User $a
269 269
 			 * @var \OC\User\User $b
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
 		$this->emit('\OC\User', 'preCreateUser', [$uid, $password]);
344 344
 		$state = $backend->createUser($uid, $password);
345
-		if($state === false) {
345
+		if ($state === false) {
346 346
 			throw new \InvalidArgumentException($l->t('Could not create user'));
347 347
 		}
348 348
 		$user = $this->getUserObject($uid, $backend);
@@ -368,13 +368,13 @@  discard block
 block discarded – undo
368 368
 		foreach ($this->backends as $backend) {
369 369
 			if ($backend->implementsActions(Backend::COUNT_USERS)) {
370 370
 				$backendUsers = $backend->countUsers();
371
-				if($backendUsers !== false) {
372
-					if($backend instanceof IUserBackend) {
371
+				if ($backendUsers !== false) {
372
+					if ($backend instanceof IUserBackend) {
373 373
 						$name = $backend->getBackendName();
374 374
 					} else {
375 375
 						$name = get_class($backend);
376 376
 					}
377
-					if(isset($userCountStatistics[$name])) {
377
+					if (isset($userCountStatistics[$name])) {
378 378
 						$userCountStatistics[$name] += $backendUsers;
379 379
 					} else {
380 380
 						$userCountStatistics[$name] = $backendUsers;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	 */
395 395
 	public function countUsersOfGroups(array $groups) {
396 396
 		$users = [];
397
-		foreach($groups as $group) {
397
+		foreach ($groups as $group) {
398 398
 			$usersIds = array_map(function($user) {
399 399
 				return $user->getUID();
400 400
 			}, $group->getUsers());
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 		$result->closeCursor();
459 459
 		
460 460
 		if ($count !== false) {
461
-			$count = (int)$count;
461
+			$count = (int) $count;
462 462
 		} else {
463 463
 			$count = 0;
464 464
 		}
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 	 */
476 476
 	public function countDisabledUsersOfGroups(array $groups): int {
477 477
 		$queryBuilder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
478
-		$queryBuilder->select($queryBuilder->createFunction('COUNT(DISTINCT ' . $queryBuilder->getColumnName('uid') . ')'))
478
+		$queryBuilder->select($queryBuilder->createFunction('COUNT(DISTINCT '.$queryBuilder->getColumnName('uid').')'))
479 479
 			->from('preferences', 'p')
480 480
 			->innerJoin('p', 'group_user', 'g', $queryBuilder->expr()->eq('p.userid', 'g.uid'))
481 481
 			->where($queryBuilder->expr()->eq('appid', $queryBuilder->createNamedParameter('core')))
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 		$result->closeCursor();
489 489
 		
490 490
 		if ($count !== false) {
491
-			$count = (int)$count;
491
+			$count = (int) $count;
492 492
 		} else {
493 493
 			$count = 0;
494 494
 		}
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 
513 513
 		$query = $queryBuilder->execute();
514 514
 
515
-		$result = (int)$query->fetchColumn();
515
+		$result = (int) $query->fetchColumn();
516 516
 		$query->closeCursor();
517 517
 
518 518
 		return $result;
Please login to merge, or discard this patch.
lib/private/Group/Database.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 *
151 151
 	 * Checks whether the user is member of a group or not.
152 152
 	 */
153
-	public function inGroup( $uid, $gid ) {
153
+	public function inGroup($uid, $gid) {
154 154
 		$this->fixDI();
155 155
 
156 156
 		// check
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 		$this->fixDI();
180 180
 
181 181
 		// No duplicate entries!
182
-		if( !$this->inGroup( $uid, $gid )) {
182
+		if (!$this->inGroup($uid, $gid)) {
183 183
 			$qb = $this->dbConn->getQueryBuilder();
184 184
 			$qb->insert('group_user')
185 185
 				->setValue('uid', $qb->createNamedParameter($uid))
186 186
 				->setValue('gid', $qb->createNamedParameter($gid))
187 187
 				->execute();
188 188
 			return true;
189
-		}else{
189
+		} else {
190 190
 			return false;
191 191
 		}
192 192
 	}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	 * This function fetches all groups a user belongs to. It does not check
220 220
 	 * if the user exists at all.
221 221
 	 */
222
-	public function getUserGroups( $uid ) {
222
+	public function getUserGroups($uid) {
223 223
 		//guests has empty or null $uid
224 224
 		if ($uid === null || $uid === '') {
225 225
 			return [];
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			->execute();
236 236
 
237 237
 		$groups = [];
238
-		while( $row = $cursor->fetch()) {
238
+		while ($row = $cursor->fetch()) {
239 239
 			$groups[] = $row['gid'];
240 240
 			$this->groupCache[$row['gid']] = $row['gid'];
241 241
 		}
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 		if ($search !== '') {
265 265
 			$query->where($query->expr()->iLike('gid', $query->createNamedParameter(
266
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
266
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
267 267
 			)));
268 268
 		}
269 269
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
 		if ($search !== '') {
329 329
 			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
330
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
330
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
331 331
 			)));
332 332
 		}
333 333
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
 		if ($search !== '') {
362 362
 			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
363
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
363
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
364 364
 			)));
365 365
 		}
366 366
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		$result->closeCursor();
370 370
 
371 371
 		if ($count !== false) {
372
-			$count = (int)$count;
372
+			$count = (int) $count;
373 373
 		} else {
374 374
 			$count = 0;
375 375
 		}
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		$this->fixDI();
388 388
 		
389 389
 		$query = $this->dbConn->getQueryBuilder();
390
-		$query->select($query->createFunction('COUNT(DISTINCT ' . $query->getColumnName('uid') . ')'))
390
+		$query->select($query->createFunction('COUNT(DISTINCT '.$query->getColumnName('uid').')'))
391 391
 			->from('preferences', 'p')
392 392
 			->innerJoin('p', 'group_user', 'g', $query->expr()->eq('p.userid', 'g.uid'))
393 393
 			->where($query->expr()->eq('appid', $query->createNamedParameter('core')))
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 		$result->closeCursor();
401 401
 		
402 402
 		if ($count !== false) {
403
-			$count = (int)$count;
403
+			$count = (int) $count;
404 404
 		} else {
405 405
 			$count = 0;
406 406
 		}
Please login to merge, or discard this patch.
apps/dav/lib/Migration/BuildCalendarSearchIndex.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
 		}
71 71
 
72 72
 		$query = $this->db->getQueryBuilder();
73
-		$query->select($query->createFunction('MAX(' . $query->getColumnName('id') . ')'))
73
+		$query->select($query->createFunction('MAX('.$query->getColumnName('id').')'))
74 74
 			->from('calendarobjects');
75
-		$maxId = (int)$query->execute()->fetchColumn();
75
+		$maxId = (int) $query->execute()->fetchColumn();
76 76
 
77 77
 		$output->info('Add background job');
78 78
 		$this->jobList->add(BuildCalendarSearchIndexBackgroundJob::class, [
Please login to merge, or discard this patch.
apps/user_ldap/lib/Mapping/AbstractMapping.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @return bool
54 54
 	 */
55 55
 	public function isColNameValid($col) {
56
-		switch($col) {
56
+		switch ($col) {
57 57
 			case 'ldap_dn':
58 58
 			case 'owncloud_name':
59 59
 			case 'directory_uuid':
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
 	 * @return string|false
73 73
 	 */
74 74
 	protected function getXbyY($fetchCol, $compareCol, $search) {
75
-		if(!$this->isColNameValid($fetchCol)) {
75
+		if (!$this->isColNameValid($fetchCol)) {
76 76
 			//this is used internally only, but we don't want to risk
77 77
 			//having SQL injection at all.
78 78
 			throw new \Exception('Invalid Column Name');
79 79
 		}
80 80
 		$query = $this->dbc->prepare('
81
-			SELECT `' . $fetchCol . '`
82
-			FROM `'. $this->getTableName() .'`
83
-			WHERE `' . $compareCol . '` = ?
81
+			SELECT `' . $fetchCol.'`
82
+			FROM `'. $this->getTableName().'`
83
+			WHERE `' . $compareCol.'` = ?
84 84
 		');
85 85
 
86 86
 		$res = $query->execute(array($search));
87
-		if($res !== false) {
87
+		if ($res !== false) {
88 88
 			return $query->fetchColumn();
89 89
 		}
90 90
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function setDNbyUUID($fdn, $uuid) {
122 122
 		$query = $this->dbc->prepare('
123
-			UPDATE `' . $this->getTableName() . '`
123
+			UPDATE `' . $this->getTableName().'`
124 124
 			SET `ldap_dn` = ?
125 125
 			WHERE `directory_uuid` = ?
126 126
 		');
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function setUUIDbyDN($uuid, $fdn) {
141 141
 		$query = $this->dbc->prepare('
142
-			UPDATE `' . $this->getTableName() . '`
142
+			UPDATE `' . $this->getTableName().'`
143 143
 			SET `directory_uuid` = ?
144 144
 			WHERE `ldap_dn` = ?
145 145
 		');
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
 	public function getNamesBySearch($search, $prefixMatch = "", $postfixMatch = "") {
167 167
 		$query = $this->dbc->prepare('
168 168
 			SELECT `owncloud_name`
169
-			FROM `'. $this->getTableName() .'`
169
+			FROM `'. $this->getTableName().'`
170 170
 			WHERE `owncloud_name` LIKE ?
171 171
 		');
172 172
 
173 173
 		$res = $query->execute(array($prefixMatch.$this->dbc->escapeLikeParameter($search).$postfixMatch));
174 174
 		$names = array();
175
-		if($res !== false) {
176
-			while($row = $query->fetch()) {
175
+		if ($res !== false) {
176
+			while ($row = $query->fetch()) {
177 177
 				$names[] = $row['owncloud_name'];
178 178
 			}
179 179
 		}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 				`ldap_dn` AS `dn`,
212 212
 				`owncloud_name` AS `name`,
213 213
 				`directory_uuid` AS `uuid`
214
-			FROM `' . $this->getTableName() . '`',
214
+			FROM `' . $this->getTableName().'`',
215 215
 			$limit,
216 216
 			$offset
217 217
 		);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 * @return bool
229 229
 	 */
230 230
 	public function map($fdn, $name, $uuid) {
231
-		if(mb_strlen($fdn) > 255) {
231
+		if (mb_strlen($fdn) > 255) {
232 232
 			\OC::$server->getLogger()->error(
233 233
 				'Cannot map, because the DN exceeds 255 characters: {dn}',
234 234
 				[
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		try {
249 249
 			$result = $this->dbc->insertIfNotExist($this->getTableName(), $row);
250 250
 			// insertIfNotExist returns values as int
251
-			return (bool)$result;
251
+			return (bool) $result;
252 252
 		} catch (\Exception $e) {
253 253
 			return false;
254 254
 		}
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 */
262 262
 	public function unmap($name) {
263 263
 		$query = $this->dbc->prepare('
264
-			DELETE FROM `'. $this->getTableName() .'`
264
+			DELETE FROM `'. $this->getTableName().'`
265 265
 			WHERE `owncloud_name` = ?');
266 266
 
267 267
 		return $this->modify($query, array($name));
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	public function clear() {
275 275
 		$sql = $this->dbc
276 276
 			->getDatabasePlatform()
277
-			->getTruncateTableSQL('`' . $this->getTableName() . '`');
277
+			->getTruncateTableSQL('`'.$this->getTableName().'`');
278 278
 		return $this->dbc->prepare($sql)->execute();
279 279
 	}
280 280
 
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
 			->from($this->getTableName());
294 294
 		$cursor = $picker->execute();
295 295
 		$result = true;
296
-		while($id = $cursor->fetchColumn(0)) {
296
+		while ($id = $cursor->fetchColumn(0)) {
297 297
 			$preCallback($id);
298
-			if($isUnmapped = $this->unmap($id)) {
298
+			if ($isUnmapped = $this->unmap($id)) {
299 299
 				$postCallback($id);
300 300
 			}
301 301
 			$result &= $isUnmapped;
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	public function count() {
313 313
 		$qb = $this->dbc->getQueryBuilder();
314
-		$query = $qb->select($qb->createFunction('COUNT(' . $qb->getColumnName('ldap_dn') . ')'))
314
+		$query = $qb->select($qb->createFunction('COUNT('.$qb->getColumnName('ldap_dn').')'))
315 315
 			->from($this->getTableName());
316 316
 		$res = $query->execute();
317 317
 		$count = $res->fetchColumn();
318 318
 		$res->closeCursor();
319
-		return (int)$count;
319
+		return (int) $count;
320 320
 	}
321 321
 }
Please login to merge, or discard this patch.
apps/files_sharing/lib/Command/CleanupRemoteStorages.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$remoteStorages = $this->getRemoteStorages();
65 65
 
66
-		$output->writeln(count($remoteStorages) . ' remote storage(s) need(s) to be checked');
66
+		$output->writeln(count($remoteStorages).' remote storage(s) need(s) to be checked');
67 67
 
68 68
 		$remoteShareIds = $this->getRemoteShareIds();
69 69
 
70
-		$output->writeln(count($remoteShareIds) . ' remote share(s) exist');
70
+		$output->writeln(count($remoteShareIds).' remote share(s) exist');
71 71
 
72 72
 		foreach ($remoteShareIds as $id => $remoteShareId) {
73 73
 			if (isset($remoteStorages[$remoteShareId])) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	public function countFiles($numericId, OutputInterface $output) {
100 100
 		$queryBuilder = $this->connection->getQueryBuilder();
101
-		$queryBuilder->select($queryBuilder->createFunction('COUNT(' . $queryBuilder->getColumnName('fileid') . ')'))
101
+		$queryBuilder->select($queryBuilder->createFunction('COUNT('.$queryBuilder->getColumnName('fileid').')'))
102 102
 			->from('filecache')
103 103
 			->where($queryBuilder->expr()->eq(
104 104
 				'storage',
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 			->where($queryBuilder->expr()->like(
146 146
 				'id',
147 147
 				// match all 'shared::' + 32 characters storages
148
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::') . str_repeat('_', 32)),
148
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::').str_repeat('_', 32)),
149 149
 				IQueryBuilder::PARAM_STR)
150 150
 			)
151 151
 			->andWhere($queryBuilder->expr()->notLike(
152 152
 				'id',
153 153
 				// but not the ones starting with a '/', they are for normal shares
154
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/') . '%'),
154
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/').'%'),
155 155
 				IQueryBuilder::PARAM_STR)
156 156
 			)->orderBy('numeric_id');
157 157
 		$query = $queryBuilder->execute();
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$remoteShareIds = [];
176 176
 
177 177
 		while ($row = $query->fetch()) {
178
-			$remoteShareIds[$row['id']] = 'shared::' . md5($row['share_token'] . '@' . $row['remote']);
178
+			$remoteShareIds[$row['id']] = 'shared::'.md5($row['share_token'].'@'.$row['remote']);
179 179
 		}
180 180
 
181 181
 		return $remoteShareIds;
Please login to merge, or discard this patch.