Completed
Push — master ( 5cb16a...ada3b1 )
by John
23:13
created
lib/private/Group/Database.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
 
252 252
 		if ($search !== '') {
253 253
 			$query->where($query->expr()->iLike('gid', $query->createNamedParameter(
254
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
254
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
255 255
 			)));
256 256
 			$query->orWhere($query->expr()->iLike('displayname', $query->createNamedParameter(
257
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
257
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
258 258
 			)));
259 259
 		}
260 260
 
@@ -335,11 +335,11 @@  discard block
 block discarded – undo
335 335
 			$qb->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY);
336 336
 			$result = $qb->executeQuery();
337 337
 			while ($row = $result->fetch()) {
338
-				$this->groupCache[(string)$row['gid']] = [
339
-					'displayname' => (string)$row['displayname'],
340
-					'gid' => (string)$row['gid'],
338
+				$this->groupCache[(string) $row['gid']] = [
339
+					'displayname' => (string) $row['displayname'],
340
+					'gid' => (string) $row['gid'],
341 341
 				];
342
-				$existingGroups[] = (string)$row['gid'];
342
+				$existingGroups[] = (string) $row['gid'];
343 343
 			}
344 344
 			$result->closeCursor();
345 345
 		}
@@ -386,9 +386,9 @@  discard block
 block discarded – undo
386 386
 
387 387
 		if ($search !== '') {
388 388
 			// sqlite doesn't like re-using a single named parameter here
389
-			$searchParam1 = $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%');
390
-			$searchParam2 = $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%');
391
-			$searchParam3 = $query->createNamedParameter('%' . $this->dbConn->escapeLikeParameter($search) . '%');
389
+			$searchParam1 = $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%');
390
+			$searchParam2 = $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%');
391
+			$searchParam3 = $query->createNamedParameter('%'.$this->dbConn->escapeLikeParameter($search).'%');
392 392
 
393 393
 			$query->andWhere(
394 394
 				$query->expr()->orX(
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
 		if ($search !== '') {
438 438
 			$query->andWhere($query->expr()->like('uid', $query->createNamedParameter(
439
-				'%' . $this->dbConn->escapeLikeParameter($search) . '%'
439
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
440 440
 			)));
441 441
 		}
442 442
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 		$result->closeCursor();
446 446
 
447 447
 		if ($count !== false) {
448
-			$count = (int)$count;
448
+			$count = (int) $count;
449 449
 		} else {
450 450
 			$count = 0;
451 451
 		}
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 		$this->fixDI();
465 465
 
466 466
 		$query = $this->dbConn->getQueryBuilder();
467
-		$query->select($query->createFunction('COUNT(DISTINCT ' . $query->getColumnName('uid') . ')'))
467
+		$query->select($query->createFunction('COUNT(DISTINCT '.$query->getColumnName('uid').')'))
468 468
 			->from('preferences', 'p')
469 469
 			->innerJoin('p', 'group_user', 'g', $query->expr()->eq('p.userid', 'g.uid'))
470 470
 			->where($query->expr()->eq('appid', $query->createNamedParameter('core')))
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 		$result->closeCursor();
478 478
 
479 479
 		if ($count !== false) {
480
-			$count = (int)$count;
480
+			$count = (int) $count;
481 481
 		} else {
482 482
 			$count = 0;
483 483
 		}
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 		$displayName = $result->fetchOne();
506 506
 		$result->closeCursor();
507 507
 
508
-		return (string)$displayName;
508
+		return (string) $displayName;
509 509
 	}
510 510
 
511 511
 	public function getGroupDetails(string $gid): array {
@@ -544,10 +544,10 @@  discard block
 block discarded – undo
544 544
 
545 545
 			$result = $query->executeQuery();
546 546
 			while ($row = $result->fetch()) {
547
-				$details[(string)$row['gid']] = ['displayName' => (string)$row['displayname']];
548
-				$this->groupCache[(string)$row['gid']] = [
549
-					'displayname' => (string)$row['displayname'],
550
-					'gid' => (string)$row['gid'],
547
+				$details[(string) $row['gid']] = ['displayName' => (string) $row['displayname']];
548
+				$this->groupCache[(string) $row['gid']] = [
549
+					'displayname' => (string) $row['displayname'],
550
+					'gid' => (string) $row['gid'],
551 551
 				];
552 552
 			}
553 553
 			$result->closeCursor();
Please login to merge, or discard this patch.