Completed
Pull Request — master (#1106)
by Julius
28s
created
lib/Command/CirclesList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,9 +257,9 @@
 block discarded – undo
257 257
 					Circle::$DEF_SOURCE[$circle->getSource()],
258 258
 					$this->cut($displayName ? $owner->getDisplayName() : $owner->getUserId(), 40),
259 259
 					$this->configService->displayInstance($owner->getInstance()),
260
-					$circle->getPopulation() . '/'
260
+					$circle->getPopulation().'/'
261 261
 					. $this->getInt('members_limit', $circle->getSettings(), -1)
262
-					. ' (' . $circle->getPopulationInherited() . ')'
262
+					. ' ('.$circle->getPopulationInherited().')'
263 263
 				]
264 264
 			);
265 265
 		}
Please login to merge, or discard this patch.
lib/Service/GSUpstreamService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			}
146 146
 		} catch (Exception $e) {
147 147
 			$this->miscService->log(
148
-				get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1
148
+				get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1
149 149
 			);
150 150
 			throw $e;
151 151
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 * @throws RequestResultNotJsonException
216 216
 	 * @throws GlobalScaleEventException
217 217
 	 */
218
-	public function confirmEvent(GSEvent &$event): void {
218
+	public function confirmEvent(GSEvent & $event): void {
219 219
 		$this->signEvent($event);
220 220
 
221 221
 		$circle = $event->getDeprecatedCircle();
@@ -229,13 +229,13 @@  discard block
 block discarded – undo
229 229
 		$request->setDataSerialize($event);
230 230
 
231 231
 		$result = $this->retrieveJson($request);
232
-		$this->miscService->log('result ' . json_encode($result), 0);
232
+		$this->miscService->log('result '.json_encode($result), 0);
233 233
 		if ($this->getInt('status', $result) === 0) {
234 234
 			throw new GlobalScaleEventException($this->get('error', $result));
235 235
 		}
236 236
 
237 237
 		$updatedData = $this->getArray('event', $result);
238
-		$this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0);
238
+		$this->miscService->log('updatedEvent: '.json_encode($updatedData), 0);
239 239
 		if (!empty($updatedData)) {
240 240
 			$updated = new GSEvent();
241 241
 			try {
Please login to merge, or discard this patch.
lib/Service/RemoteStreamService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	public function getCachedRemoteInstance(string $instance): RemoteInstance {
331 331
 		$remoteInstance = $this->remoteRequest->getFromInstance($instance);
332 332
 		if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) {
333
-			throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database');
333
+			throw new UnknownRemoteException($instance.' is set as \'unknown\' in database');
334 334
 		}
335 335
 
336 336
 		return $remoteInstance;
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 	 * @throws RemoteNotFoundException
572 572
 	 * @throws RemoteUidException
573 573
 	 */
574
-	public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance &$stored = null): void {
574
+	public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance & $stored = null): void {
575 575
 		try {
576 576
 			$stored = $this->remoteRequest->getFromHref($remote->getId());
577 577
 		} catch (RemoteNotFoundException $e) {
Please login to merge, or discard this patch.
lib/Db/ShareWrapperRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 		}
439 439
 
440 440
 		$ids = array_map(
441
-			function (ShareWrapper $share): string {
441
+			function(ShareWrapper $share): string {
442 442
 				return $share->getId();
443 443
 			},
444 444
 			$this->getItemsFromRequest($qb)
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 		$expr = $qb->expr();
454 454
 		$qb->leftJoin(
455 455
 			CoreQueryBuilder::SHARE, CoreRequestBuilder::TABLE_SHARE, 'p',
456
-			$expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE . '.parent'))
456
+			$expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE.'.parent'))
457 457
 		);
458 458
 
459 459
 		$qb->filterNull('parent');
Please login to merge, or discard this patch.
lib/Service/MaintenanceService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 
62 62
 	public static $DELAY =
63 63
 		[
64
-			1 => 60,    // every minute
65
-			2 => 300,   // every 5 minutes
66
-			3 => 3600,  // every hour
64
+			1 => 60, // every minute
65
+			2 => 300, // every 5 minutes
66
+			3 => 3600, // every hour
67 67
 			4 => 75400, // every day
68 68
 			5 => 432000 // evey week
69 69
 		];
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		$this->federatedUserService->bypassCurrentUserCondition(true);
179 179
 
180 180
 		$this->lockMaintenanceRun();
181
-		$this->debug('running maintenance (' . $level . ')');
181
+		$this->debug('running maintenance ('.$level.')');
182 182
 
183 183
 		switch ($level) {
184 184
 			case 1:
@@ -349,14 +349,14 @@  discard block
 block discarded – undo
349 349
 			  ->includeSystemCircles();
350 350
 
351 351
 		$circles = array_map(
352
-			function (Circle $circle) {
352
+			function(Circle $circle) {
353 353
 				return $circle->getSingleId();
354 354
 			}, $this->circleRequest->getCircles(null, $probe)
355 355
 		);
356 356
 
357 357
 		$shares = array_unique(
358 358
 			array_map(
359
-				function (ShareWrapper $share) {
359
+				function(ShareWrapper $share) {
360 360
 					return $share->getSharedWith();
361 361
 				}, $this->shareWrapperRequest->getShares()
362 362
 			)
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 	 */
502 502
 	private function output(string $message): void {
503 503
 		if (!is_null($this->output)) {
504
-			$this->output->writeln('- ' . $message);
504
+			$this->output->writeln('- '.$message);
505 505
 		}
506 506
 	}
507 507
 }
Please login to merge, or discard this patch.
lib/Command/CirclesCreate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		} catch (FederatedItemException $e) {
125 125
 			if ($input->getOption('status-code')) {
126 126
 				throw new FederatedItemException(
127
-					' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage()
127
+					' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage()
128 128
 				);
129 129
 			}
130 130
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 		} elseif (strtolower($input->getOption('output')) !== 'none') {
137 137
 			/** @var Circle $circle */
138 138
 			$circle = $this->deserialize($outcome, Circle::class);
139
-			$output->writeln('Id: <info>' . $circle->getSingleId() . '</info>');
140
-			$output->writeln('Name: <info>' . $circle->getDisplayName() . '</info>');
141
-			$output->writeln('Owner: <info>' . $circle->getOwner()->getDisplayName() . '</info>');
139
+			$output->writeln('Id: <info>'.$circle->getSingleId().'</info>');
140
+			$output->writeln('Name: <info>'.$circle->getDisplayName().'</info>');
141
+			$output->writeln('Owner: <info>'.$circle->getOwner()->getDisplayName().'</info>');
142 142
 		}
143 143
 
144 144
 		return 0;
Please login to merge, or discard this patch.
lib/Model/ShareWrapper.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 			$l10n = \OC::$server::get(IFactory::class)->get('circles');
682 682
 			$display = $l10n->t('%s (Circle owned by %s)', [$display, $circle->getOwner()->getDisplayName()]);
683 683
 		} else {
684
-			$display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')';
684
+			$display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')';
685 685
 		}
686 686
 
687 687
 		$share->setSharedWithDisplayName($display);
@@ -787,20 +787,20 @@  discard block
 block discarded – undo
787 787
 	 */
788 788
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
789 789
 		$shareTime = new DateTime();
790
-		$shareTime->setTimestamp($this->getInt($prefix . 'stime', $data));
791
-
792
-		$this->setId($this->get($prefix . 'id', $data))
793
-			 ->setShareType($this->getInt($prefix . 'share_type', $data))
794
-			 ->setPermissions($this->getInt($prefix . 'permissions', $data))
795
-			 ->setItemType($this->get($prefix . 'item_type', $data))
796
-			 ->setItemSource($this->getInt($prefix . 'item_source', $data))
797
-			 ->setItemTarget($this->get($prefix . 'item_target', $data))
798
-			 ->setFileSource($this->getInt($prefix . 'file_source', $data))
799
-			 ->setFileTarget($this->get($prefix . 'file_target', $data))
800
-			 ->setSharedWith($this->get($prefix . 'share_with', $data))
801
-			 ->setSharedBy($this->get($prefix . 'uid_initiator', $data))
802
-			 ->setShareOwner($this->get($prefix . 'uid_owner', $data))
803
-			 ->setToken($this->get($prefix . 'token', $data))
790
+		$shareTime->setTimestamp($this->getInt($prefix.'stime', $data));
791
+
792
+		$this->setId($this->get($prefix.'id', $data))
793
+			 ->setShareType($this->getInt($prefix.'share_type', $data))
794
+			 ->setPermissions($this->getInt($prefix.'permissions', $data))
795
+			 ->setItemType($this->get($prefix.'item_type', $data))
796
+			 ->setItemSource($this->getInt($prefix.'item_source', $data))
797
+			 ->setItemTarget($this->get($prefix.'item_target', $data))
798
+			 ->setFileSource($this->getInt($prefix.'file_source', $data))
799
+			 ->setFileTarget($this->get($prefix.'file_target', $data))
800
+			 ->setSharedWith($this->get($prefix.'share_with', $data))
801
+			 ->setSharedBy($this->get($prefix.'uid_initiator', $data))
802
+			 ->setShareOwner($this->get($prefix.'uid_owner', $data))
803
+			 ->setToken($this->get($prefix.'token', $data))
804 804
 			 ->setShareTime($shareTime);
805 805
 
806 806
 //		if (($password = $this->get('personal_password', $data, '')) !== '') {
@@ -809,9 +809,9 @@  discard block
 block discarded – undo
809 809
 //			$share->setPassword($this->get('password', $data, ''));
810 810
 //		}
811 811
 
812
-		$this->setChildId($this->getInt($prefix . 'child_id', $data))
813
-			 ->setChildFileTarget($this->get($prefix . 'child_file_target', $data))
814
-			 ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data))
812
+		$this->setChildId($this->getInt($prefix.'child_id', $data))
813
+			 ->setChildFileTarget($this->get($prefix.'child_file_target', $data))
814
+			 ->setChildPermissions($this->getInt($prefix.'child_permissions', $data))
815 815
 			 ->setProviderId(ShareByCircleProvider::IDENTIFIER)
816 816
 			 ->setStatus(Ishare::STATUS_ACCEPTED);
817 817
 
Please login to merge, or discard this patch.