@@ -150,12 +150,12 @@ discard block |
||
150 | 150 | try { |
151 | 151 | $gs = OC::$server->query($class); |
152 | 152 | if (!$gs instanceof AGlobalScaleEvent) { |
153 | - throw new GlobalScaleEventException($class . ' not an AGlobalScaleEvent'); |
|
153 | + throw new GlobalScaleEventException($class.' not an AGlobalScaleEvent'); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return $gs; |
157 | 157 | } catch (QueryException $e) { |
158 | - throw new GlobalScaleEventException('AGlobalScaleEvent ' . $class . ' not found'); |
|
158 | + throw new GlobalScaleEventException('AGlobalScaleEvent '.$class.' not found'); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | try { |
207 | 207 | $instances = $this->retrieveJson($request); |
208 | 208 | } catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $e) { |
209 | - $this->miscService->log('Issue while retrieving instances from lookup: ' . $e->getMessage()); |
|
209 | + $this->miscService->log('Issue while retrieving instances from lookup: '.$e->getMessage()); |
|
210 | 210 | |
211 | 211 | return []; |
212 | 212 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $className = $event->getType(); |
233 | 233 | if (substr($className, 0, 25) !== '\OCA\Circles\GlobalScale\\' || strpos($className, '.')) { |
234 | 234 | throw new GlobalScaleEventException( |
235 | - $className . ' does not seems to be a secured AGlobalScaleEvent' |
|
235 | + $className.' does not seems to be a secured AGlobalScaleEvent' |
|
236 | 236 | ); |
237 | 237 | } |
238 | 238 |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | $this->miscService->log( |
150 | - 'Create frame with payload ' . json_encode($frame->getPayload()) . ' as ' . $userId, 0 |
|
150 | + 'Create frame with payload '.json_encode($frame->getPayload()).' as '.$userId, 0 |
|
151 | 151 | ); |
152 | 152 | try { |
153 | 153 | $circle = $this->circlesRequest->getCircle($circleUniqueId, $userId); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->initiateShare($circle->getUniqueId(), $frame->getUniqueId()); |
163 | 163 | } catch (Exception $e) { |
164 | 164 | $this->miscService->log( |
165 | - 'fail to create frame for circle ' . $circleUniqueId . ' - ' . $e->getMessage() |
|
165 | + 'fail to create frame for circle '.$circleUniqueId.' - '.$e->getMessage() |
|
166 | 166 | ); |
167 | 167 | throw $e; |
168 | 168 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | ]; |
302 | 302 | |
303 | 303 | $client = $this->clientService->newClient(); |
304 | - $addr = $this->configService->getLocalAddress() . \OC::$WEBROOT; |
|
304 | + $addr = $this->configService->getLocalAddress().\OC::$WEBROOT; |
|
305 | 305 | $opts = [ |
306 | 306 | 'body' => $args, |
307 | 307 | 'timeout' => Application::CLIENT_TIMEOUT, |
@@ -318,8 +318,8 @@ discard block |
||
318 | 318 | return true; |
319 | 319 | } catch (Exception $e) { |
320 | 320 | $this->miscService->log( |
321 | - 'fail to initialise circle share to ' . $addr . ' for circle ' . $circleUniqueId . ' - ' |
|
322 | - . json_encode($opts) . ' - ' . $e->getMessage(), 3 |
|
321 | + 'fail to initialise circle share to '.$addr.' for circle '.$circleUniqueId.' - ' |
|
322 | + . json_encode($opts).' - '.$e->getMessage(), 3 |
|
323 | 323 | ); |
324 | 324 | throw $e; |
325 | 325 | } |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | * @return string |
333 | 333 | */ |
334 | 334 | private function generatePayloadDeliveryURL($remote) { |
335 | - return $this->configService->generateRemoteHost($remote) . |
|
335 | + return $this->configService->generateRemoteHost($remote). |
|
336 | 336 | $this->urlGenerator->linkToRoute('circles.Shares.initShareDelivery'); |
337 | 337 | } |
338 | 338 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | |
408 | 408 | } catch (Exception $e) { |
409 | 409 | $this->miscService->log( |
410 | - 'fail to send frame to ' . $link->getAddress() . ' - ' . $e->getMessage() |
|
410 | + 'fail to send frame to '.$link->getAddress().' - '.$e->getMessage() |
|
411 | 411 | ); |
412 | 412 | } |
413 | 413 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | $expr = $qb->expr(); |
259 | - $pf = '' . $this->default_select_alias . '.'; |
|
259 | + $pf = ''.$this->default_select_alias.'.'; |
|
260 | 260 | |
261 | 261 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
262 | 262 | $qb->selectAlias('u.user_id', 'viewer_userid') |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | ->leftJoin( |
268 | 268 | $this->default_select_alias, CoreRequestBuilder::TABLE_MEMBERS, 'u', |
269 | 269 | $expr->andX( |
270 | - $expr->eq('u.circle_id', $pf . 'unique_id'), |
|
270 | + $expr->eq('u.circle_id', $pf.'unique_id'), |
|
271 | 271 | $expr->eq('u.user_id', $qb->createNamedParameter($userId)), |
272 | 272 | $expr->eq('u.instance', $qb->createNamedParameter($instanceId)), |
273 | 273 | $expr->eq('u.user_type', $qb->createNamedParameter(Member::TYPE_USER)) |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | |
291 | 291 | $expr = $qb->expr(); |
292 | - $pf = $this->default_select_alias . '.'; |
|
292 | + $pf = $this->default_select_alias.'.'; |
|
293 | 293 | |
294 | 294 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
295 | 295 | $qb->selectAlias('o.user_id', 'owner_userid') |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | ->leftJoin( |
300 | 300 | $this->default_select_alias, CoreRequestBuilder::TABLE_MEMBERS, 'o', |
301 | 301 | $expr->andX( |
302 | - $expr->eq('o.circle_id', $pf . 'unique_id'), |
|
302 | + $expr->eq('o.circle_id', $pf.'unique_id'), |
|
303 | 303 | $expr->eq('o.level', $qb->createNamedParameter(Member::LEVEL_OWNER)), |
304 | 304 | $expr->eq('o.user_type', $qb->createNamedParameter(Member::TYPE_USER)) |
305 | 305 | ) |
@@ -203,7 +203,7 @@ |
||
203 | 203 | $cursor->closeCursor(); |
204 | 204 | |
205 | 205 | if ($data === false) { |
206 | - throw new CircleDoesNotExistException($this->l10n->t('Circle not found ' . $circleUniqueId)); |
|
206 | + throw new CircleDoesNotExistException($this->l10n->t('Circle not found '.$circleUniqueId)); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | $circle = $this->parseCirclesSelectSql($data); |
@@ -344,8 +344,8 @@ discard block |
||
344 | 344 | $expr = $qb->expr(); |
345 | 345 | |
346 | 346 | if ($pf === '') { |
347 | - $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
348 | - $qb->andWhere($expr->gte($p . 'level', $qb->createNamedParameter($level))); |
|
347 | + $p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
348 | + $qb->andWhere($expr->gte($p.'level', $qb->createNamedParameter($level))); |
|
349 | 349 | |
350 | 350 | return; |
351 | 351 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | if ($p === 'g' && !$this->leftJoinedNCGroupAndUser) { |
374 | 374 | continue; |
375 | 375 | } |
376 | - $orX->add($expr->gte($p . '.level', $qb->createNamedParameter($level))); |
|
376 | + $orX->add($expr->gte($p.'.level', $qb->createNamedParameter($level))); |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | return $orX; |
@@ -388,12 +388,12 @@ discard block |
||
388 | 388 | protected function limitToMembersAndAlmost(IQueryBuilder &$qb) { |
389 | 389 | $expr = $qb->expr(); |
390 | 390 | |
391 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
391 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
392 | 392 | |
393 | 393 | $orX = $expr->orX(); |
394 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_MEMBER))); |
|
395 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_INVITED))); |
|
396 | - $orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_REQUEST))); |
|
394 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_MEMBER))); |
|
395 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_INVITED))); |
|
396 | + $orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_REQUEST))); |
|
397 | 397 | |
398 | 398 | $qb->andWhere($orX); |
399 | 399 | } |
@@ -406,8 +406,8 @@ discard block |
||
406 | 406 | */ |
407 | 407 | private function limitToDBField(IQueryBuilder &$qb, $field, $value) { |
408 | 408 | $expr = $qb->expr(); |
409 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
410 | - $qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value))); |
|
409 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
410 | + $qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value))); |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | |
@@ -418,8 +418,8 @@ discard block |
||
418 | 418 | */ |
419 | 419 | private function limitToDBFieldOrGreater(IQueryBuilder &$qb, $field, $value) { |
420 | 420 | $expr = $qb->expr(); |
421 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
422 | - $qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value))); |
|
421 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
422 | + $qb->andWhere($expr->gte($pf.$field, $qb->createNamedParameter($value))); |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | |
@@ -434,9 +434,9 @@ discard block |
||
434 | 434 | protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') { |
435 | 435 | $expr = $qb->expr(); |
436 | 436 | |
437 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : ''; |
|
437 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : ''; |
|
438 | 438 | |
439 | - $and = $expr->andX($expr->eq($pf . 'group_id', 'ncgu.gid')); |
|
439 | + $and = $expr->andX($expr->eq($pf.'group_id', 'ncgu.gid')); |
|
440 | 440 | if ($userId !== '') { |
441 | 441 | $and->add($expr->eq('ncgu.uid', $qb->createNamedParameter($userId))); |
442 | 442 | } else { |
@@ -475,14 +475,14 @@ discard block |
||
475 | 475 | } |
476 | 476 | |
477 | 477 | $expr = $qb->expr(); |
478 | - $pf = $this->default_select_alias . '.'; |
|
478 | + $pf = $this->default_select_alias.'.'; |
|
479 | 479 | |
480 | 480 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
481 | 481 | $qb->selectAlias('lc.type', 'circle_type') |
482 | 482 | ->selectAlias('lc.name', 'circle_name') |
483 | 483 | ->leftJoin( |
484 | 484 | $this->default_select_alias, CoreRequestBuilder::TABLE_CIRCLES, 'lc', |
485 | - $expr->eq($pf . 'circle_id', 'lc.unique_id') |
|
485 | + $expr->eq($pf.'circle_id', 'lc.unique_id') |
|
486 | 486 | ); |
487 | 487 | } |
488 | 488 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
78 | 78 | $qb->andWhere( |
79 | 79 | $expr->in( |
80 | - $pf . 'share_with', |
|
80 | + $pf.'share_with', |
|
81 | 81 | $qb->createNamedParameter($circleUniqueIds, IQueryBuilder::PARAM_STR_ARRAY) |
82 | 82 | ) |
83 | 83 | ); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $expr = $qb->expr(); |
95 | 95 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
96 | 96 | |
97 | - $qb->andWhere($expr->eq($pf . 'id', $qb->createNamedParameter($shareId))); |
|
97 | + $qb->andWhere($expr->eq($pf.'id', $qb->createNamedParameter($shareId))); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
144 | 144 | $qb->andWhere( |
145 | 145 | $expr->orX( |
146 | - $expr->eq($pf . 'parent', $qb->createNamedParameter($circleId)), |
|
147 | - $expr->eq($pf . 'id', $qb->createNamedParameter($circleId)) |
|
146 | + $expr->eq($pf.'parent', $qb->createNamedParameter($circleId)), |
|
147 | + $expr->eq($pf.'id', $qb->createNamedParameter($circleId)) |
|
148 | 148 | ) |
149 | 149 | ); |
150 | 150 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
167 | 167 | $qb->andWhere( |
168 | 168 | $expr->in( |
169 | - $pf . 'file_source', |
|
169 | + $pf.'file_source', |
|
170 | 170 | $qb->createNamedParameter($files, IQueryBuilder::PARAM_INT_ARRAY) |
171 | 171 | ) |
172 | 172 | ); |
@@ -199,13 +199,13 @@ discard block |
||
199 | 199 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
200 | 200 | |
201 | 201 | if ($reShares === false) { |
202 | - $qb->andWhere($expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId))); |
|
202 | + $qb->andWhere($expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId))); |
|
203 | 203 | } else { |
204 | 204 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
205 | 205 | $qb->andWhere( |
206 | 206 | $expr->orX( |
207 | - $expr->eq($pf . 'uid_owner', $qb->createNamedParameter($userId)), |
|
208 | - $expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId)) |
|
207 | + $expr->eq($pf.'uid_owner', $qb->createNamedParameter($userId)), |
|
208 | + $expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId)) |
|
209 | 209 | ) |
210 | 210 | ); |
211 | 211 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | */ |
93 | 93 | protected function execute(InputInterface $input, OutputInterface $output): int { |
94 | 94 | $instances = $this->globalScaleService->getInstances(true); |
95 | - $output->writeln('<info>Instances: </info>' . json_encode($instances)); |
|
95 | + $output->writeln('<info>Instances: </info>'.json_encode($instances)); |
|
96 | 96 | |
97 | 97 | return 0; |
98 | 98 | } |