Completed
Pull Request — master (#326)
by Maxence
01:32
created
lib/Service/MembersService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@
 block discarded – undo
323 323
 			return;
324 324
 		}
325 325
 
326
-		$tmpContact = $this->userId . ':' . $ident;
326
+		$tmpContact = $this->userId.':'.$ident;
327 327
 		$result = MiscService::getContactData($tmpContact);
328 328
 		if (empty($result)) {
329 329
 			throw new NoUserException($this->l10n->t("This contact is not available"));
Please login to merge, or discard this patch.
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @param $ident
120 120
 	 * @param int $type
121 121
 	 *
122
-	 * @return array
122
+	 * @return Member[]
123 123
 	 * @throws Exception
124 124
 	 */
125 125
 	public function addMember($circleUniqueId, $ident, $type) {
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
 	/**
279 279
 	 * Verify if a local account is valid.
280 280
 	 *
281
-	 * @param $ident
282
-	 * @param $type
281
+	 * @param string $ident
282
+	 * @param integer $type
283 283
 	 *
284 284
 	 * @throws NoUserException
285 285
 	 */
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 * Verify if a mail have a valid format.
301 301
 	 *
302 302
 	 * @param $ident
303
-	 * @param $type
303
+	 * @param integer $type
304 304
 	 *
305 305
 	 * @throws EmailAccountInvalidFormatException
306 306
 	 */
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 	 * Verify if a contact exist in current user address books.
322 322
 	 *
323 323
 	 * @param $ident
324
-	 * @param $type
324
+	 * @param integer $type
325 325
 	 *
326 326
 	 * @throws NoUserException
327 327
 	 */
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
 	 * Will return any data of a user related to a circle (as a Member). User can be a 'non-member'
404 404
 	 * Viewer needs to be at least Member of the Circle
405 405
 	 *
406
-	 * @param $circleId
407
-	 * @param $userId
406
+	 * @param string $circleId
407
+	 * @param string $userId
408 408
 	 * @param $type
409 409
 	 * @param bool $forceAll
410 410
 	 *
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	 * @param int $type
434 434
 	 * @param int $level
435 435
 	 *
436
-	 * @return array
436
+	 * @return Member[]
437 437
 	 * @throws Exception
438 438
 	 */
439 439
 	public function levelMember($circleUniqueId, $name, $type, $level) {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 	/**
465 465
 	 * @param Circle $circle
466 466
 	 * @param Member $member
467
-	 * @param $level
467
+	 * @param integer $level
468 468
 	 *
469 469
 	 * @throws Exception
470 470
 	 */
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
 	/**
540 540
 	 * @param string $circleUniqueId
541 541
 	 * @param string $name
542
-	 * @param $type
542
+	 * @param integer $type
543 543
 	 *
544
-	 * @return array
544
+	 * @return Member[]
545 545
 	 * @throws Exception
546 546
 	 */
547 547
 	public function removeMember($circleUniqueId, $name, $type) {
Please login to merge, or discard this patch.
lib/Circles/FileSharingBroadcaster.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	 * @param $fileName
231 231
 	 * @param string $link
232 232
 	 * @param string $author
233
-	 * @param $circleName
233
+	 * @param string $circleName
234 234
 	 * @param string $email
235 235
 	 */
236 236
 	protected function sendMail($fileName, $link, $author, $circleName, $email) {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 * @param $subject
265 265
 	 * @param $text
266 266
 	 * @param $fileName
267
-	 * @param $link
267
+	 * @param string $link
268 268
 	 * @param string $author
269 269
 	 * @param string $circleName
270 270
 	 *
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @throws IllegalIDChangeException
187 187
 	 */
188 188
 	private function generateShare($data) {
189
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
189
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
190 190
 
191 191
 		$share = new Share($this->rootFolder, $this->userManager);
192 192
 		$share->setId($data['id']);
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 		$message = $this->mailer->createMessage();
238 238
 
239 239
 		$this->logger->log(
240
-			0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
241
-			   . ' - link: ' . $link
240
+			0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
241
+			   . ' - link: '.$link
242 242
 		);
243 243
 
244 244
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		$emailTemplate->addHeader();
286 286
 		$emailTemplate->addHeading($subject, false);
287 287
 		$emailTemplate->addBodyText(
288
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
288
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
289 289
 				$this->l10n->t('Click the button below to open it.')
290 290
 			), $text
291 291
 		);
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.
appinfo/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,5 +32,5 @@
 block discarded – undo
32 32
 $app->registerFilesNavigation();
33 33
 $app->registerFilesPlugin();
34 34
 
35
-require_once __DIR__ . '/autoload.php';
35
+require_once __DIR__.'/autoload.php';
36 36
 
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -281,19 +281,19 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	private function createShare($share) {
283 283
 		$this->miscService->log(
284
-			'Creating share (1/4) - type: ' . $share->getShareType() . ' - token: '
285
-			. $share->getToken() . ' - type: ' . $share->getShareType() . ' - with: '
286
-			. $share->getSharedWith() . ' - permissions: ' . $share->getPermissions(), 0
284
+			'Creating share (1/4) - type: '.$share->getShareType().' - token: '
285
+			. $share->getToken().' - type: '.$share->getShareType().' - with: '
286
+			. $share->getSharedWith().' - permissions: '.$share->getPermissions(), 0
287 287
 		);
288 288
 
289 289
 		$qb = $this->getBaseInsertSql($share);
290
-		$this->miscService->log('Share creation (2/4) : ' . json_encode($qb->getSQL()), 0);
290
+		$this->miscService->log('Share creation (2/4) : '.json_encode($qb->getSQL()), 0);
291 291
 
292 292
 		$result = $qb->execute();
293
-		$this->miscService->log('Share creation result (3/4) : ' . json_encode($result), 0);
293
+		$this->miscService->log('Share creation result (3/4) : '.json_encode($result), 0);
294 294
 
295 295
 		$id = $qb->getLastInsertId();
296
-		$this->miscService->log('Share created ID (4/4) : ' . $id, 0);
296
+		$this->miscService->log('Share created ID (4/4) : '.$id, 0);
297 297
 
298 298
 		try {
299 299
 			$share->setId($id);
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 	public function getShareByToken($token) {
519 519
 		$qb = $this->dbConnection->getQueryBuilder();
520 520
 
521
-		$this->miscService->log("Opening share by token '#" . $token . "'", 0);
521
+		$this->miscService->log("Opening share by token '#".$token."'", 0);
522 522
 
523 523
 		$cursor = $qb->select('*')
524 524
 					 ->from('share')
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 		$data = $cursor->fetch();
539 539
 
540 540
 		if ($data === false) {
541
-			$this->miscService->log("Share '#" . $token . "' not found.", 0);
541
+			$this->miscService->log("Share '#".$token."' not found.", 0);
542 542
 			throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
543 543
 		}
544 544
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 			$share = $this->createShareObject($data);
547 547
 		} catch (InvalidShare $e) {
548 548
 			$this->miscService->log(
549
-				"Share Object '#" . $token . "' not created. " . json_encode($data), 0
549
+				"Share Object '#".$token."' not created. ".json_encode($data), 0
550 550
 			);
551 551
 			throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share'));
552 552
 		}
Please login to merge, or discard this patch.
lib/Db/TokensRequest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 	 * @param Member $member
99 99
 	 * @param int $shareId
100 100
 	 *
101
-	 * @return mixed
101
+	 * @return string
102 102
 	 */
103 103
 	public function generateTokenForMember(Member $member, int $shareId) {
104 104
 		$token = $this->uuid(15);
Please login to merge, or discard this patch.
lib/Controller/SharesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,12 +220,12 @@
 block discarded – undo
220 220
 			$token = $this->sharesRequest->getTokenByShareId($shareToken->getShareId());
221 221
 		} catch (Exception $e) {
222 222
 			$this->miscService->log(
223
-				'token ' . $token . ' not found - ' . get_class($e) . ' - ' . $e->getMessage()
223
+				'token '.$token.' not found - '.get_class($e).' - '.$e->getMessage()
224 224
 			);
225 225
 			$token = $this->uuid(15);
226 226
 		}
227 227
 
228
-		return new RedirectResponse($this->urlGenerator->getAbsoluteURL('/s/' . $token));
228
+		return new RedirectResponse($this->urlGenerator->getAbsoluteURL('/s/'.$token));
229 229
 	}
230 230
 
231 231
 
Please login to merge, or discard this patch.