Completed
Pull Request — master (#331)
by Maxence
01:41
created
lib/Circles/FileSharingBroadcaster.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @param $fileName
258 258
 	 * @param string $link
259 259
 	 * @param string $author
260
-	 * @param $circleName
260
+	 * @param string $circleName
261 261
 	 * @param string $email
262 262
 	 *
263 263
 	 * @throws Exception
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 	 * @param string $circleName
295 295
 	 * @param string $email
296 296
 	 *
297
-	 * @param $password
297
+	 * @param string $password
298 298
 	 *
299 299
 	 * @throws NotFoundException
300 300
 	 * @throws Exception
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 	 * @param $subject
372 372
 	 * @param $text
373 373
 	 * @param $fileName
374
-	 * @param $link
374
+	 * @param string $link
375 375
 	 * @param string $author
376 376
 	 * @param string $circleName
377 377
 	 *
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 * @throws IllegalIDChangeException
204 204
 	 */
205 205
 	private function generateShare($data) {
206
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
206
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
207 207
 
208 208
 		$share = new Share($this->rootFolder, $this->userManager);
209 209
 		$share->setId($data['id']);
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			}
249 249
 		} catch (Exception $e) {
250 250
 			OC::$server->getLogger()
251
-					   ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage());
251
+					   ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage());
252 252
 		}
253 253
 	}
254 254
 
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
 		$message = $this->mailer->createMessage();
267 267
 
268 268
 		$this->logger->log(
269
-			0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
270
-			   . ' - link: ' . $link
269
+			0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
270
+			   . ' - link: '.$link
271 271
 		);
272 272
 
273 273
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 	protected function sendPasswordByMail(IShare $share, $circleName, $email, $password) {
303 303
 		$message = $this->mailer->createMessage();
304 304
 
305
-		$this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email);
305
+		$this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email);
306 306
 
307 307
 		$filename = $share->getNode()
308 308
 						  ->getName();
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
357 357
 		if ($initiatorEmailAddress !== null) {
358 358
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
359
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
359
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
360 360
 		} else {
361 361
 			$emailTemplate->addFooter();
362 362
 		}
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		$emailTemplate->addHeader();
393 393
 		$emailTemplate->addHeading($subject, false);
394 394
 		$emailTemplate->addBodyText(
395
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
395
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
396 396
 				$this->l10n->t('Click the button below to open it.')
397 397
 			), $text
398 398
 		);
Please login to merge, or discard this patch.
lib/Db/TokensRequest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 	 *
95 95
 	 * @param string $password
96 96
 	 *
97
-	 * @return mixed
97
+	 * @return string
98 98
 	 */
99 99
 	public function generateTokenForMember(Member $member, int $shareId, string $password = '') {
100 100
 		$token = $this->miscService->uuid(15);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
 			return $token;
115 115
 		} catch (Exception $e) {
116
-			$this->miscService->log('exception while generateTokenForMember: ' . $e->getMessage());
116
+			$this->miscService->log('exception while generateTokenForMember: '.$e->getMessage());
117 117
 
118 118
 			return '';
119 119
 		}
Please login to merge, or discard this patch.
lib/Service/MembersService.php 1 patch
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * @param $ident
127 127
 	 * @param int $type
128 128
 	 *
129
-	 * @return array
129
+	 * @return Member[]
130 130
 	 * @throws Exception
131 131
 	 */
132 132
 	public function addMember($circleUniqueId, $ident, $type) {
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 	/**
286 286
 	 * Verify if a local account is valid.
287 287
 	 *
288
-	 * @param $ident
289
-	 * @param $type
288
+	 * @param string $ident
289
+	 * @param integer $type
290 290
 	 *
291 291
 	 * @throws NoUserException
292 292
 	 */
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * Verify if a mail have a valid format.
308 308
 	 *
309 309
 	 * @param $ident
310
-	 * @param $type
310
+	 * @param integer $type
311 311
 	 *
312 312
 	 * @throws EmailAccountInvalidFormatException
313 313
 	 */
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	 * Verify if a contact exist in current user address books.
336 336
 	 *
337 337
 	 * @param $ident
338
-	 * @param $type
338
+	 * @param integer $type
339 339
 	 *
340 340
 	 * @throws NoUserException
341 341
 	 * @throws EmailAccountInvalidFormatException
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 	 * @param int $type
455 455
 	 * @param int $level
456 456
 	 *
457
-	 * @return array
457
+	 * @return Member[]
458 458
 	 * @throws Exception
459 459
 	 */
460 460
 	public function levelMember($circleUniqueId, $name, $type, $level) {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 	/**
486 486
 	 * @param Circle $circle
487 487
 	 * @param Member $member
488
-	 * @param $level
488
+	 * @param integer $level
489 489
 	 *
490 490
 	 * @throws Exception
491 491
 	 */
@@ -560,9 +560,9 @@  discard block
 block discarded – undo
560 560
 	/**
561 561
 	 * @param string $circleUniqueId
562 562
 	 * @param string $name
563
-	 * @param $type
563
+	 * @param integer $type
564 564
 	 *
565
-	 * @return array
565
+	 * @return Member[]
566 566
 	 * @throws Exception
567 567
 	 */
568 568
 	public function removeMember($circleUniqueId, $name, $type) {
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -299,19 +299,19 @@  discard block
 block discarded – undo
299 299
 	 */
300 300
 	private function createShare($share) {
301 301
 		$this->miscService->log(
302
-			'Creating share (1/4) - type: ' . $share->getShareType() . ' - token: '
303
-			. $share->getToken() . ' - type: ' . $share->getShareType() . ' - with: '
304
-			. $share->getSharedWith() . ' - permissions: ' . $share->getPermissions(), 0
302
+			'Creating share (1/4) - type: '.$share->getShareType().' - token: '
303
+			. $share->getToken().' - type: '.$share->getShareType().' - with: '
304
+			. $share->getSharedWith().' - permissions: '.$share->getPermissions(), 0
305 305
 		);
306 306
 
307 307
 		$qb = $this->getBaseInsertSql($share);
308
-		$this->miscService->log('Share creation (2/4) : ' . json_encode($qb->getSQL()), 0);
308
+		$this->miscService->log('Share creation (2/4) : '.json_encode($qb->getSQL()), 0);
309 309
 
310 310
 		$result = $qb->execute();
311
-		$this->miscService->log('Share creation result (3/4) : ' . json_encode($result), 0);
311
+		$this->miscService->log('Share creation result (3/4) : '.json_encode($result), 0);
312 312
 
313 313
 		$id = $qb->getLastInsertId();
314
-		$this->miscService->log('Share created ID (4/4) : ' . $id, 0);
314
+		$this->miscService->log('Share created ID (4/4) : '.$id, 0);
315 315
 
316 316
 		try {
317 317
 			$share->setId($id);
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 	public function getShareByToken($token) {
537 537
 		$qb = $this->dbConnection->getQueryBuilder();
538 538
 
539
-		$this->miscService->log("Opening share by token '#" . $token . "'", 0);
539
+		$this->miscService->log("Opening share by token '#".$token."'", 0);
540 540
 
541 541
 		$cursor = $qb->select('*')
542 542
 					 ->from('share')
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 			try {
561 561
 				$data = $this->getShareByPersonalToken($token);
562 562
 			} catch (\Exception $e) {
563
-				$this->miscService->log("Share '#" . $token . "' not found.", 0);
563
+				$this->miscService->log("Share '#".$token."' not found.", 0);
564 564
 				throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
565 565
 			}
566 566
 		}
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 			$share = $this->createShareObject($data);
570 570
 		} catch (InvalidShare $e) {
571 571
 			$this->miscService->log(
572
-				"Share Object '#" . $token . "' not created. " . json_encode($data), 0
572
+				"Share Object '#".$token."' not created. ".json_encode($data), 0
573 573
 			);
574 574
 			throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
575 575
 		}
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 				$data['personal_circle_id'], $data['personal_user_id'], Member::TYPE_MAIL, true
622 622
 			);
623 623
 		} catch (\Exception $e) {
624
-			$this->miscService->log('__ no 1 ' . $e->getMessage());
624
+			$this->miscService->log('__ no 1 '.$e->getMessage());
625 625
 			try {
626 626
 				$member = $this->membersService->getMember(
627 627
 					$data['personal_circle_id'], $data['personal_user_id'], Member::TYPE_CONTACT, true
Please login to merge, or discard this patch.