@@ -140,12 +140,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ) |
@@ -217,7 +217,7 @@ |
||
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 |
@@ -296,7 +296,7 @@ |
||
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) { |
@@ -109,7 +109,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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) { |
@@ -34,10 +34,10 @@ |
||
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 | */ |
@@ -487,24 +487,24 @@ |
||
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 |