Completed
Pull Request — master (#439)
by Joas
01:52
created
lib/Service/SharingFrameService.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 *
151 151
 	 * @param SharingFrame $frame
152 152
 	 * @param Circle $circle
153
-	 * @param $broadcast
153
+	 * @param string|null $broadcast
154 154
 	 */
155 155
 	private function generateHeaders(SharingFrame $frame, Circle $circle, $broadcast) {
156 156
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	 * Please use getFrameFromCircle();
190 190
 	 *
191 191
 	 * @param string $circleUniqueId
192
-	 * @param $viewerId
192
+	 * @param string $viewerId
193 193
 	 *
194 194
 	 * @return SharingFrame[]
195 195
 	 */
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		}
148 148
 
149 149
 		$this->miscService->log(
150
-			'Create frame with payload ' . json_encode($frame->getPayload()) . ' as ' . $userId, 0
150
+			'Create frame with payload '.json_encode($frame->getPayload()).' as '.$userId, 0
151 151
 		);
152 152
 		try {
153 153
 			$circle = $this->circlesRequest->getCircle($circleUniqueId, $userId);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			$this->initiateShare($circle->getUniqueId(), $frame->getUniqueId());
163 163
 		} catch (Exception $e) {
164 164
 			$this->miscService->log(
165
-				'fail to create frame for circle ' . $circleUniqueId . ' - ' . $e->getMessage()
165
+				'fail to create frame for circle '.$circleUniqueId.' - '.$e->getMessage()
166 166
 			);
167 167
 			throw $e;
168 168
 		}
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 		];
302 302
 
303 303
 		$client = $this->clientService->newClient();
304
-		$addr = $this->configService->getLocalAddress() . \OC::$WEBROOT;
304
+		$addr = $this->configService->getLocalAddress().\OC::$WEBROOT;
305 305
 		$opts = [
306 306
 			'body'            => $args,
307 307
 			'timeout'         => Application::CLIENT_TIMEOUT,
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
 			return true;
319 319
 		} catch (Exception $e) {
320 320
 			$this->miscService->log(
321
-				'fail to initialise circle share to ' . $addr . ' for circle ' . $circleUniqueId . ' - '
322
-				. json_encode($opts) . ' - ' . $e->getMessage(), 3
321
+				'fail to initialise circle share to '.$addr.' for circle '.$circleUniqueId.' - '
322
+				. json_encode($opts).' - '.$e->getMessage(), 3
323 323
 			);
324 324
 			throw $e;
325 325
 		}
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	 * @return string
333 333
 	 */
334 334
 	private function generatePayloadDeliveryURL($remote) {
335
-		return $this->configService->generateRemoteHost($remote) .
335
+		return $this->configService->generateRemoteHost($remote).
336 336
 			   $this->urlGenerator->linkToRoute('circles.Shares.initShareDelivery');
337 337
 	}
338 338
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 
408 408
 		} catch (Exception $e) {
409 409
 			$this->miscService->log(
410
-				'fail to send frame to ' . $link->getAddress() . ' - ' . $e->getMessage()
410
+				'fail to send frame to '.$link->getAddress().' - '.$e->getMessage()
411 411
 			);
412 412
 		}
413 413
 	}
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -438,8 +438,8 @@
 block discarded – undo
438 438
 
439 439
 	/**
440 440
 	 * @param string $userId
441
-	 * @param $shareType
442
-	 * @param Node $node
441
+	 * @param integer $shareType
442
+	 * @param Node|null $node
443 443
 	 * @param int $limit
444 444
 	 * @param int $offset
445 445
 	 *
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -300,19 +300,19 @@  discard block
 block discarded – undo
300 300
 	 */
301 301
 	private function createShare($share) {
302 302
 		$this->miscService->log(
303
-			'Creating share (1/4) - type: ' . $share->getShareType() . ' - token: '
304
-			. $share->getToken() . ' - type: ' . $share->getShareType() . ' - with: '
305
-			. $share->getSharedWith() . ' - permissions: ' . $share->getPermissions(), 0
303
+			'Creating share (1/4) - type: '.$share->getShareType().' - token: '
304
+			. $share->getToken().' - type: '.$share->getShareType().' - with: '
305
+			. $share->getSharedWith().' - permissions: '.$share->getPermissions(), 0
306 306
 		);
307 307
 
308 308
 		$qb = $this->getBaseInsertSql($share);
309
-		$this->miscService->log('Share creation (2/4) : ' . json_encode($qb->getSQL()), 0);
309
+		$this->miscService->log('Share creation (2/4) : '.json_encode($qb->getSQL()), 0);
310 310
 
311 311
 		$result = $qb->execute();
312
-		$this->miscService->log('Share creation result (3/4) : ' . json_encode($result), 0);
312
+		$this->miscService->log('Share creation result (3/4) : '.json_encode($result), 0);
313 313
 
314 314
 		$id = $qb->getLastInsertId();
315
-		$this->miscService->log('Share created ID (4/4) : ' . $id, 0);
315
+		$this->miscService->log('Share created ID (4/4) : '.$id, 0);
316 316
 
317 317
 		try {
318 318
 			$share->setId($id);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 	public function getShareByToken($token) {
539 539
 		$qb = $this->dbConnection->getQueryBuilder();
540 540
 
541
-		$this->miscService->log("Opening share by token '#" . $token . "'", 0);
541
+		$this->miscService->log("Opening share by token '#".$token."'", 0);
542 542
 
543 543
 		$cursor = $qb->select('*')
544 544
 					 ->from('share')
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 			try {
563 563
 				$data = $this->getShareByPersonalToken($token);
564 564
 			} catch (Exception $e) {
565
-				$this->miscService->log("Share '#" . $token . "' not found.", 0);
565
+				$this->miscService->log("Share '#".$token."' not found.", 0);
566 566
 				throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
567 567
 			}
568 568
 		}
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 			$share = $this->createShareObject($data);
572 572
 		} catch (InvalidShare $e) {
573 573
 			$this->miscService->log(
574
-				"Share Object '#" . $token . "' not created. " . json_encode($data), 0
574
+				"Share Object '#".$token."' not created. ".json_encode($data), 0
575 575
 			);
576 576
 			throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
577 577
 		}
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
 			throw new ShareNotFound('personal check not found');
621 621
 		}
622 622
 
623
-		\OC::$server->getLogger()->log(3, '#### ' . json_encode($data));
623
+		\OC::$server->getLogger()->log(3, '#### '.json_encode($data));
624 624
 		$member = null;
625 625
 		try {
626 626
 			$member = $this->membersService->getMemberById($data['personal_member_id']);
Please login to merge, or discard this patch.
lib/Service/FederatedLinkService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
 	 * @return string
218 218
 	 */
219 219
 	public function generateLinkRemoteURL($remote) {
220
-		return $this->configService->generateRemoteHost($remote) . self::REMOTE_URL_LINK;
220
+		return $this->configService->generateRemoteHost($remote).self::REMOTE_URL_LINK;
221 221
 	}
222 222
 
223 223
 
Please login to merge, or discard this patch.
lib/Model/Circle.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 
147 147
 	/**
148 148
 	 * @param array $arr
149
-	 * @param $key
149
+	 * @param string $key
150 150
 	 * @param int $type
151 151
 	 *
152 152
 	 * @return null|Member
Please login to merge, or discard this patch.
lib/Api/v1/Circles.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 	 */
454 454
 	public static function generateLink($circleUniqueId) {
455 455
 		return \OC::$server->getURLGenerator()
456
-						   ->linkToRoute('circles.Navigation.navigate') . '#' . $circleUniqueId;
456
+						   ->linkToRoute('circles.Navigation.navigate').'#'.$circleUniqueId;
457 457
 	}
458 458
 
459 459
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	 */
469 469
 	public static function generateAbsoluteLink($circleUniqueId) {
470 470
 		return \OC::$server->getURLGenerator()
471
-						   ->linkToRouteAbsolute('circles.Navigation.navigate') . '#' . $circleUniqueId;
471
+						   ->linkToRouteAbsolute('circles.Navigation.navigate').'#'.$circleUniqueId;
472 472
 	}
473 473
 
474 474
 
@@ -483,8 +483,8 @@  discard block
 block discarded – undo
483 483
 	 */
484 484
 	public static function generateRemoteLink(FederatedLink $link) {
485 485
 		return \OC::$server->getURLGenerator()
486
-						   ->linkToRoute('circles.Navigation.navigate') . '#' . $link->getUniqueId()
487
-			   . '-' . $link->getToken();
486
+						   ->linkToRoute('circles.Navigation.navigate').'#'.$link->getUniqueId()
487
+			   . '-'.$link->getToken();
488 488
 	}
489 489
 
490 490
 
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 	public static function generateUserParameter(SharingFrame $frame) {
497 497
 
498 498
 		if ($frame->getCloudId() !== null) {
499
-			$name = $frame->getAuthor() . '@' . $frame->getCloudId();
499
+			$name = $frame->getAuthor().'@'.$frame->getCloudId();
500 500
 		} else {
501 501
 			$name = MiscService::getDisplay($frame->getAuthor(), Member::TYPE_USER);
502 502
 		}
Please login to merge, or discard this patch.
lib/Controller/FederatedController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@
 block discarded – undo
265 265
 	 * @return DataResponse
266 266
 	 */
267 267
 	private function federatedFail($reason) {
268
-		$this->miscService->log(0, 'federated fail: ' . $reason);
268
+		$this->miscService->log(0, 'federated fail: '.$reason);
269 269
 
270 270
 		return new DataResponse(
271 271
 			[
Please login to merge, or discard this patch.
lib/Service/CirclesService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -510,24 +510,24 @@
 block discarded – undo
510 510
 		switch ($type) {
511 511
 			case Circle::CIRCLES_PERSONAL:
512 512
 				return $urlGen->getAbsoluteURL(
513
-					$urlGen->imagePath(Application::APP_NAME, 'personal' . $ext)
513
+					$urlGen->imagePath(Application::APP_NAME, 'personal'.$ext)
514 514
 				);
515 515
 			case Circle::CIRCLES_CLOSED:
516 516
 				return $urlGen->getAbsoluteURL(
517
-					$urlGen->imagePath(Application::APP_NAME, 'closed' . $ext)
517
+					$urlGen->imagePath(Application::APP_NAME, 'closed'.$ext)
518 518
 				);
519 519
 			case Circle::CIRCLES_SECRET:
520 520
 				return $urlGen->getAbsoluteURL(
521
-					$urlGen->imagePath(Application::APP_NAME, 'secret' . $ext)
521
+					$urlGen->imagePath(Application::APP_NAME, 'secret'.$ext)
522 522
 				);
523 523
 			case Circle::CIRCLES_PUBLIC:
524 524
 				return $urlGen->getAbsoluteURL(
525
-					$urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext)
525
+					$urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext)
526 526
 				);
527 527
 		}
528 528
 
529 529
 		return $urlGen->getAbsoluteURL(
530
-			$urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext)
530
+			$urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext)
531 531
 		);
532 532
 	}
533 533
 
Please login to merge, or discard this patch.
appinfo/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 
32 32
 namespace OCA\Circles\AppInfo;
33 33
 
34
-$composerDir = __DIR__ . '/../vendor/';
34
+$composerDir = __DIR__.'/../vendor/';
35 35
 
36
-if (is_dir($composerDir) && file_exists($composerDir . 'autoload.php')) {
37
-	require_once $composerDir . 'autoload.php';
36
+if (is_dir($composerDir) && file_exists($composerDir.'autoload.php')) {
37
+	require_once $composerDir.'autoload.php';
38 38
 }
39 39
 
Please login to merge, or discard this patch.
lib/Service/MembersService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@
 block discarded – undo
344 344
 			);
345 345
 		}
346 346
 
347
-		$tmpContact = $this->userId . ':' . $ident;
347
+		$tmpContact = $this->userId.':'.$ident;
348 348
 		$result = MiscService::getContactData($tmpContact);
349 349
 		if (empty($result)) {
350 350
 			throw new NoUserException($this->l10n->t("This contact is not available"));
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 *
149 149
 	 * @param bool $force
150 150
 	 *
151
-	 * @return array
151
+	 * @return Member[]
152 152
 	 * @throws Exception
153 153
 	 */
154 154
 	public function addMember($circleUniqueId, $ident, $type, string $instance, bool $force = false) {
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
 	/**
314 314
 	 * Verify if a local account is valid.
315 315
 	 *
316
-	 * @param $ident
317
-	 * @param $type
316
+	 * @param string $ident
317
+	 * @param integer $type
318 318
 	 *
319 319
 	 * @param string $instance
320 320
 	 *
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 	 * Verify if a mail have a valid format.
340 340
 	 *
341 341
 	 * @param $ident
342
-	 * @param $type
342
+	 * @param integer $type
343 343
 	 *
344 344
 	 * @throws EmailAccountInvalidFormatException
345 345
 	 */
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
 	/**
367 367
 	 * Verify if a contact exist in current user address books.
368 368
 	 *
369
-	 * @param $ident
370
-	 * @param $type
369
+	 * @param string $ident
370
+	 * @param integer $type
371 371
 	 *
372 372
 	 * @throws NoUserException
373 373
 	 * @throws EmailAccountInvalidFormatException
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 	 * Will return any data of a user related to a circle (as a Member). User can be a 'non-member'
459 459
 	 * Viewer needs to be at least Member of the Circle
460 460
 	 *
461
-	 * @param $circleId
462
-	 * @param $userId
461
+	 * @param string $circleId
462
+	 * @param string $userId
463 463
 	 * @param $type
464 464
 	 * @param bool $forceAll
465 465
 	 *
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 	 * @param int $level
502 502
 	 * @param bool $force
503 503
 	 *
504
-	 * @return array
504
+	 * @return Member[]
505 505
 	 * @throws CircleDoesNotExistException
506 506
 	 * @throws CircleTypeNotValidException
507 507
 	 * @throws ConfigNoCircleAvailableException
Please login to merge, or discard this patch.