Completed
Pull Request — master (#222)
by Julius
03:00
created
lib/Db/CoreRequestBuilder.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	protected function limitToShortenUniqueId(IQueryBuilder &$qb, $circleUniqueId, $length) {
142 142
 		$expr = $qb->expr();
143
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? '`' . $this->default_select_alias . '`.' : '';
143
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? '`'.$this->default_select_alias.'`.' : '';
144 144
 
145 145
 		$qb->andWhere(
146 146
 			$expr->eq(
147 147
 				$qb->createNamedParameter($circleUniqueId),
148
-				$qb->createFunction('SUBSTR(' . $pf . '`unique_id`' . ', 1, ' . $length . ')')
148
+				$qb->createFunction('SUBSTR('.$pf.'`unique_id`'.', 1, '.$length.')')
149 149
 			)
150 150
 		);
151 151
 
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
 		$expr = $qb->expr();
199 199
 
200 200
 		if ($pf === '') {
201
-			$p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
202
-			$qb->andWhere($expr->gte($p . 'level', $qb->createNamedParameter($level)));
201
+			$p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
202
+			$qb->andWhere($expr->gte($p.'level', $qb->createNamedParameter($level)));
203 203
 
204 204
 			return;
205 205
 		}
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			if ($p === 'g' && !$this->leftJoinedNCGroupAndUser) {
228 228
 				continue;
229 229
 			}
230
-			$orX->add($expr->gte($p . '.level', $qb->createNamedParameter($level)));
230
+			$orX->add($expr->gte($p.'.level', $qb->createNamedParameter($level)));
231 231
 		}
232 232
 
233 233
 		return $orX;
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
 	protected function limitToMembersAndAlmost(IQueryBuilder &$qb) {
243 243
 		$expr = $qb->expr();
244 244
 
245
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
245
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
246 246
 
247 247
 		$orX = $expr->orX();
248
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_MEMBER)));
249
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_INVITED)));
250
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_REQUEST)));
248
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_MEMBER)));
249
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_INVITED)));
250
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_REQUEST)));
251 251
 
252 252
 		$qb->andWhere($orX);
253 253
 	}
@@ -260,8 +260,8 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	private function limitToDBField(IQueryBuilder &$qb, $field, $value) {
262 262
 		$expr = $qb->expr();
263
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
264
-		$qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value)));
263
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
264
+		$qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value)));
265 265
 	}
266 266
 
267 267
 
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
 	 */
273 273
 	private function limitToDBFieldOrGreater(IQueryBuilder &$qb, $field, $value) {
274 274
 		$expr = $qb->expr();
275
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
276
-		$qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value)));
275
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
276
+		$qb->andWhere($expr->gte($pf.$field, $qb->createNamedParameter($value)));
277 277
 	}
278 278
 
279 279
 
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
 	protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') {
289 289
 		$expr = $qb->expr();
290 290
 
291
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
291
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
292 292
 
293
-		$and = $expr->andX($expr->eq($pf . 'group_id', 'ncgu.gid'));
293
+		$and = $expr->andX($expr->eq($pf.'group_id', 'ncgu.gid'));
294 294
 		if ($userId !== '') {
295 295
 			$and->add($expr->eq('ncgu.uid', $qb->createNamedParameter($userId)));
296 296
 		} else {
@@ -311,14 +311,14 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	protected function rightJoinCircles(IQueryBuilder &$qb) {
313 313
 		$expr = $qb->expr();
314
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
314
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
315 315
 
316 316
 		$qb->from(self::TABLE_CIRCLES, 'c')
317 317
 		   ->andWhere(
318 318
 			   $expr->eq(
319
-				   $pf . 'circle_id',
319
+				   $pf.'circle_id',
320 320
 				   $qb->createFunction(
321
-					   'SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')'
321
+					   'SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')'
322 322
 				   )
323 323
 			   )
324 324
 		   );
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 		}
339 339
 
340 340
 		$expr = $qb->expr();
341
-		$pf = $this->default_select_alias . '.';
341
+		$pf = $this->default_select_alias.'.';
342 342
 
343 343
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
344 344
 		$qb->selectAlias('lc.type', 'circle_type')
@@ -346,9 +346,9 @@  discard block
 block discarded – undo
346 346
 		   ->leftJoin(
347 347
 			   $this->default_select_alias, CoreRequestBuilder::TABLE_CIRCLES, 'lc',
348 348
 			   $expr->eq(
349
-				   $pf . 'circle_id',
349
+				   $pf.'circle_id',
350 350
 				   $qb->createFunction(
351
-					   'SUBSTR(`lc`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')'
351
+					   'SUBSTR(`lc`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')'
352 352
 				   )
353 353
 			   )
354 354
 		   );
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 				$expr->eq('ncgu.gid', 'g.group_id'),
382 382
 				$expr->eq(
383 383
 					'g.circle_id', $qb->createFunction(
384
-					'SUBSTR(' . $field . ', 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')'
384
+					'SUBSTR('.$field.', 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')'
385 385
 				)
386 386
 				)
387 387
 			)
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/Service/MembersService.php 2 patches
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.
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param $ident
110 110
 	 * @param int $type
111 111
 	 *
112
-	 * @return array
112
+	 * @return Member[]
113 113
 	 * @throws \Exception
114 114
 	 */
115 115
 	public function addMember($circleUniqueId, $ident, $type) {
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 	/**
259 259
 	 * Verify if a local account is valid.
260 260
 	 *
261
-	 * @param $ident
262
-	 * @param $type
261
+	 * @param string $ident
262
+	 * @param integer $type
263 263
 	 *
264 264
 	 * @throws NoUserException
265 265
 	 */
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	 * Verify if a mail have a valid format.
281 281
 	 *
282 282
 	 * @param $ident
283
-	 * @param $type
283
+	 * @param integer $type
284 284
 	 *
285 285
 	 * @throws EmailAccountInvalidFormatException
286 286
 	 */
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 * Verify if a contact exist in current user address books.
302 302
 	 *
303 303
 	 * @param $ident
304
-	 * @param $type
304
+	 * @param integer $type
305 305
 	 *
306 306
 	 * @throws NoUserException
307 307
 	 */
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * @param int $type
386 386
 	 * @param int $level
387 387
 	 *
388
-	 * @return array
388
+	 * @return Member[]
389 389
 	 * @throws \Exception
390 390
 	 */
391 391
 	public function levelMember($circleUniqueId, $name, $type, $level) {
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 	/**
417 417
 	 * @param Circle $circle
418 418
 	 * @param Member $member
419
-	 * @param $level
419
+	 * @param integer $level
420 420
 	 *
421 421
 	 * @throws Exception
422 422
 	 */
@@ -489,9 +489,9 @@  discard block
 block discarded – undo
489 489
 	/**
490 490
 	 * @param string $circleUniqueId
491 491
 	 * @param string $name
492
-	 * @param $type
492
+	 * @param integer $type
493 493
 	 *
494
-	 * @return array
494
+	 * @return Member[]
495 495
 	 * @throws \Exception
496 496
 	 */
497 497
 	public function removeMember($circleUniqueId, $name, $type) {
Please login to merge, or discard this patch.
lib/Db/CircleProviderRequest.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
 
35 35
 
36 36
 	/**
37
-	 * @param $userId
37
+	 * @param string $userId
38 38
 	 * @param $circleUniqueIds
39
-	 * @param $limit
40
-	 * @param $offset
39
+	 * @param integer $limit
40
+	 * @param integer $offset
41 41
 	 *
42 42
 	 * @return array
43 43
 	 */
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
@@ -487,24 +487,24 @@
 block discarded – undo
487 487
 		switch ($type) {
488 488
 			case Circle::CIRCLES_PERSONAL:
489 489
 				return $urlGen->getAbsoluteURL(
490
-					$urlGen->imagePath(Application::APP_NAME, 'personal' . $ext)
490
+					$urlGen->imagePath(Application::APP_NAME, 'personal'.$ext)
491 491
 				);
492 492
 			case Circle::CIRCLES_CLOSED:
493 493
 				return $urlGen->getAbsoluteURL(
494
-					$urlGen->imagePath(Application::APP_NAME, 'closed' . $ext)
494
+					$urlGen->imagePath(Application::APP_NAME, 'closed'.$ext)
495 495
 				);
496 496
 			case Circle::CIRCLES_SECRET:
497 497
 				return $urlGen->getAbsoluteURL(
498
-					$urlGen->imagePath(Application::APP_NAME, 'secret' . $ext)
498
+					$urlGen->imagePath(Application::APP_NAME, 'secret'.$ext)
499 499
 				);
500 500
 			case Circle::CIRCLES_PUBLIC:
501 501
 				return $urlGen->getAbsoluteURL(
502
-					$urlGen->imagePath(Application::APP_NAME, 'public' . $ext)
502
+					$urlGen->imagePath(Application::APP_NAME, 'public'.$ext)
503 503
 				);
504 504
 		}
505 505
 
506 506
 		return $urlGen->getAbsoluteURL(
507
-			$urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext)
507
+			$urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext)
508 508
 		);
509 509
 	}
510 510
 
Please login to merge, or discard this patch.