Completed
Pull Request — master (#171)
by Joas
09:43
created
lib/Service/ConfigService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 		if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0)
185 185
 			&& strpos($remote, 'https://') !== 0
186 186
 		) {
187
-			$remote = 'https://' . $remote;
187
+			$remote = 'https://'.$remote;
188 188
 		}
189 189
 
190 190
 		return rtrim($remote, '/');
Please login to merge, or discard this patch.
lib/Service/FederatedLinkCreationService.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
 
190 190
 
191 191
 	/**
192
-	 * @param $circleUniqueId
193
-	 * @param $remote
192
+	 * @param string $circleUniqueId
193
+	 * @param string $remote
194 194
 	 *
195 195
 	 * @return FederatedLink
196 196
 	 */
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 *
282 282
 	 * Will parse the error reason returned by requestLink() and throw an Exception
283 283
 	 *
284
-	 * @param $reason
284
+	 * @param string $reason
285 285
 	 *
286 286
 	 * @throws Exception
287 287
 	 * @throws FederatedRemoteDoesNotAllowException
Please login to merge, or discard this patch.
lib/Service/MembersService.php 2 patches
Doc Comments   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
 	 *
102 102
 	 * @param string $circleUniqueId
103 103
 	 * @param $ident
104
-	 * @param $type
104
+	 * @param integer $type
105 105
 	 *
106
-	 * @return array
106
+	 * @return Member[]
107 107
 	 * @throws \Exception
108 108
 	 */
109 109
 	public function addMember($circleUniqueId, $ident, $type) {
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 	/**
245 245
 	 * Verify if a local account is valid.
246 246
 	 *
247
-	 * @param $ident
248
-	 * @param $type
247
+	 * @param string $ident
248
+	 * @param integer $type
249 249
 	 *
250 250
 	 * @throws NoUserException
251 251
 	 */
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 	 * Verify if a mail have a valid format.
267 267
 	 *
268 268
 	 * @param $ident
269
-	 * @param $type
269
+	 * @param integer $type
270 270
 	 *
271 271
 	 * @throws EmailAccountInvalidFormatException
272 272
 	 */
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * Verify if a contact exist in current user address books.
288 288
 	 *
289 289
 	 * @param $ident
290
-	 * @param $type
290
+	 * @param integer $type
291 291
 	 *
292 292
 	 * @throws NoUserException
293 293
 	 */
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 	 * @param int $type
372 372
 	 * @param int $level
373 373
 	 *
374
-	 * @return array
374
+	 * @return Member[]
375 375
 	 * @throws \Exception
376 376
 	 */
377 377
 	public function levelMember($circleUniqueId, $name, $type, $level) {
@@ -397,6 +397,9 @@  discard block
 block discarded – undo
397 397
 	}
398 398
 
399 399
 
400
+	/**
401
+	 * @param integer $level
402
+	 */
400 403
 	private function updateMemberLevel(Circle $circle, Member $member, $level) {
401 404
 		if ($member->getLevel() === $level) {
402 405
 			return;
@@ -466,9 +469,9 @@  discard block
 block discarded – undo
466 469
 	/**
467 470
 	 * @param string $circleUniqueId
468 471
 	 * @param string $name
469
-	 * @param $type
472
+	 * @param integer $type
470 473
 	 *
471
-	 * @return array
474
+	 * @return Member[]
472 475
 	 * @throws \Exception
473 476
 	 */
474 477
 	public function removeMember($circleUniqueId, $name, $type) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
 			return;
297 297
 		}
298 298
 
299
-		$tmpContact = $this->userId . ':' . $ident;
299
+		$tmpContact = $this->userId.':'.$ident;
300 300
 		try {
301 301
 			MiscService::getContactData($tmpContact);
302 302
 		} catch (Exception $e) {
Please login to merge, or discard this patch.
lib/Model/FederatedLink.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -303,6 +303,9 @@
 block discarded – undo
303 303
 	}
304 304
 
305 305
 
306
+	/**
307
+	 * @param integer $status
308
+	 */
306 309
 	public function hasToBeValidStatusUpdate($status) {
307 310
 		try {
308 311
 			$this->hasToBeValidStatusUpdateWhileLinkDown($status);
Please login to merge, or discard this patch.
lib/Service/MiscService.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 	/**
66 66
 	 * @param $arr
67
-	 * @param $k
67
+	 * @param string $k
68 68
 	 *
69 69
 	 * @param string $default
70 70
 	 *
@@ -79,6 +79,9 @@  discard block
 block discarded – undo
79 79
 	}
80 80
 
81 81
 
82
+	/**
83
+	 * @param string[] $arr
84
+	 */
82 85
 	public static function mustContains($data, $arr) {
83 86
 		if (!is_array($arr)) {
84 87
 			$arr = [$arr];
@@ -188,7 +191,7 @@  discard block
 block discarded – undo
188 191
 
189 192
 
190 193
 	/**
191
-	 * @param $ident
194
+	 * @param string $ident
192 195
 	 *
193 196
 	 * @return mixed|string
194 197
 	 */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -284,7 +284,7 @@
 block discarded – undo
284 284
 		ob_start();
285 285
 		echo(json_encode($result));
286 286
 		$size = ob_get_length();
287
-		header('Content-Length: ' . $size);
287
+		header('Content-Length: '.$size);
288 288
 		ob_end_flush();
289 289
 		flush();
290 290
 	}
Please login to merge, or discard this patch.
lib/Controller/TestController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 
129 129
 
130 130
 	/**
131
-	 * @return DataResponse
131
+	 * @return string
132 132
 	 */
133 133
 	public function testAsyncStatus() {
134 134
 		return $this->miscService->success(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 	 * @return string
92 92
 	 */
93 93
 	private function generateTestAsyncURL($remote) {
94
-		return $this->configService->generateRemoteHost($remote) . Application::TEST_URL_ASYNC;
94
+		return $this->configService->generateRemoteHost($remote).Application::TEST_URL_ASYNC;
95 95
 	}
96 96
 
97 97
 
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
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
 
180 180
 	/**
181
-	 * @param $circleName
181
+	 * @param string $circleName
182 182
 	 * @param IShare $share
183 183
 	 * @param string $email
184 184
 	 */
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	 * @param $subject
234 234
 	 * @param $text
235 235
 	 * @param $fileName
236
-	 * @param $link
236
+	 * @param string $link
237 237
 	 * @param string $author
238 238
 	 * @param string $circleName
239 239
 	 *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@
 block discarded – undo
248 248
 		$emailTemplate->addHeader();
249 249
 		$emailTemplate->addHeading($subject, false);
250 250
 		$emailTemplate->addBodyText(
251
-			htmlspecialchars($text) . '<br>' . htmlspecialchars($this->l10n->t('Click the button below to open it.')), $text
251
+			htmlspecialchars($text).'<br>'.htmlspecialchars($this->l10n->t('Click the button below to open it.')), $text
252 252
 		);
253 253
 		$emailTemplate->addBodyButton($this->l10n->t('Open »%s«', [htmlspecialchars($fileName)]), $link);
254 254
 
Please login to merge, or discard this patch.
lib/Service/CirclesService.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -403,6 +403,7 @@
 block discarded – undo
403 403
 	 * switchOlderAdminToOwner();
404 404
 	 *
405 405
 	 * @param Member[] $members
406
+	 * @param Circle $circle
406 407
 	 */
407 408
 	private function switchOlderAdminToOwner($circle, $members) {
408 409
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -481,23 +481,23 @@
 block discarded – undo
481 481
 		switch ($type) {
482 482
 			case Circle::CIRCLES_PERSONAL:
483 483
 				return $urlGen->getAbsoluteURL(
484
-					$urlGen->imagePath(Application::APP_NAME, 'personal' . $ext)
484
+					$urlGen->imagePath(Application::APP_NAME, 'personal'.$ext)
485 485
 				);
486 486
 			case Circle::CIRCLES_CLOSED:
487 487
 				return $urlGen->getAbsoluteURL(
488
-					$urlGen->imagePath(Application::APP_NAME, 'closed' . $ext)
488
+					$urlGen->imagePath(Application::APP_NAME, 'closed'.$ext)
489 489
 				);
490 490
 			case Circle::CIRCLES_SECRET:
491 491
 				return $urlGen->getAbsoluteURL(
492
-					$urlGen->imagePath(Application::APP_NAME, 'secret' . $ext)
492
+					$urlGen->imagePath(Application::APP_NAME, 'secret'.$ext)
493 493
 				);
494 494
 			case Circle::CIRCLES_PUBLIC:
495 495
 				return $urlGen->getAbsoluteURL(
496
-					$urlGen->imagePath(Application::APP_NAME, 'public' . $ext)
496
+					$urlGen->imagePath(Application::APP_NAME, 'public'.$ext)
497 497
 				);
498 498
 		}
499 499
 
500
-		return $urlGen->getAbsoluteURL($urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext));
500
+		return $urlGen->getAbsoluteURL($urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext));
501 501
 	}
502 502
 
503 503
 
Please login to merge, or discard this patch.
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		try {
280 280
 			$client->post(
281 281
 				$this->generatePayloadDeliveryURL(
282
-					$this->configService->getLocalAddress() . \OC::$WEBROOT
282
+					$this->configService->getLocalAddress().\OC::$WEBROOT
283 283
 				), [
284 284
 					'body'            => $args,
285 285
 					'timeout'         => Application::CLIENT_TIMEOUT,
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 * @return string
301 301
 	 */
302 302
 	private function generatePayloadDeliveryURL($remote) {
303
-		return $this->configService->generateRemoteHost($remote) . Application::REMOTE_URL_PAYLOAD;
303
+		return $this->configService->generateRemoteHost($remote).Application::REMOTE_URL_PAYLOAD;
304 304
 	}
305 305
 
306 306
 
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
 		} catch (Exception $e) {
376 376
 			$this->miscService->log(
377
-				'fail to send frame to ' . $link->getAddress() . ' - ' . $e->getMessage()
377
+				'fail to send frame to '.$link->getAddress().' - '.$e->getMessage()
378 378
 			);
379 379
 		}
380 380
 	}
Please login to merge, or discard this patch.