@@ -510,24 +510,24 @@ |
||
| 510 | 510 | switch ($type) { |
| 511 | 511 | case Circle::CIRCLES_PERSONAL: |
| 512 | 512 | return $urlGen->getAbsoluteURL( |
| 513 | - $urlGen->imagePath(Application::APP_NAME, 'personal' . $ext) |
|
| 513 | + $urlGen->imagePath(Application::APP_NAME, 'personal'.$ext) |
|
| 514 | 514 | ); |
| 515 | 515 | case Circle::CIRCLES_CLOSED: |
| 516 | 516 | return $urlGen->getAbsoluteURL( |
| 517 | - $urlGen->imagePath(Application::APP_NAME, 'closed' . $ext) |
|
| 517 | + $urlGen->imagePath(Application::APP_NAME, 'closed'.$ext) |
|
| 518 | 518 | ); |
| 519 | 519 | case Circle::CIRCLES_SECRET: |
| 520 | 520 | return $urlGen->getAbsoluteURL( |
| 521 | - $urlGen->imagePath(Application::APP_NAME, 'secret' . $ext) |
|
| 521 | + $urlGen->imagePath(Application::APP_NAME, 'secret'.$ext) |
|
| 522 | 522 | ); |
| 523 | 523 | case Circle::CIRCLES_PUBLIC: |
| 524 | 524 | return $urlGen->getAbsoluteURL( |
| 525 | - $urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext) |
|
| 525 | + $urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext) |
|
| 526 | 526 | ); |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | return $urlGen->getAbsoluteURL( |
| 530 | - $urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext) |
|
| 530 | + $urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext) |
|
| 531 | 531 | ); |
| 532 | 532 | } |
| 533 | 533 | |
@@ -300,19 +300,19 @@ discard block |
||
| 300 | 300 | */ |
| 301 | 301 | private function createShare($share) { |
| 302 | 302 | $this->miscService->log( |
| 303 | - 'Creating share (1/4) - type: ' . $share->getShareType() . ' - token: ' |
|
| 304 | - . $share->getToken() . ' - type: ' . $share->getShareType() . ' - with: ' |
|
| 305 | - . $share->getSharedWith() . ' - permissions: ' . $share->getPermissions(), 0 |
|
| 303 | + 'Creating share (1/4) - type: '.$share->getShareType().' - token: ' |
|
| 304 | + . $share->getToken().' - type: '.$share->getShareType().' - with: ' |
|
| 305 | + . $share->getSharedWith().' - permissions: '.$share->getPermissions(), 0 |
|
| 306 | 306 | ); |
| 307 | 307 | |
| 308 | 308 | $qb = $this->getBaseInsertSql($share); |
| 309 | - $this->miscService->log('Share creation (2/4) : ' . json_encode($qb->getSQL()), 0); |
|
| 309 | + $this->miscService->log('Share creation (2/4) : '.json_encode($qb->getSQL()), 0); |
|
| 310 | 310 | |
| 311 | 311 | $result = $qb->execute(); |
| 312 | - $this->miscService->log('Share creation result (3/4) : ' . json_encode($result), 0); |
|
| 312 | + $this->miscService->log('Share creation result (3/4) : '.json_encode($result), 0); |
|
| 313 | 313 | |
| 314 | 314 | $id = $qb->getLastInsertId(); |
| 315 | - $this->miscService->log('Share created ID (4/4) : ' . $id, 0); |
|
| 315 | + $this->miscService->log('Share created ID (4/4) : '.$id, 0); |
|
| 316 | 316 | |
| 317 | 317 | try { |
| 318 | 318 | $share->setId($id); |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | public function getShareByToken($token) { |
| 538 | 538 | $qb = $this->dbConnection->getQueryBuilder(); |
| 539 | 539 | |
| 540 | - $this->miscService->log("Opening share by token '#" . $token . "'", 0); |
|
| 540 | + $this->miscService->log("Opening share by token '#".$token."'", 0); |
|
| 541 | 541 | |
| 542 | 542 | $cursor = $qb->select('*') |
| 543 | 543 | ->from('share') |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | try { |
| 562 | 562 | $data = $this->getShareByPersonalToken($token); |
| 563 | 563 | } catch (Exception $e) { |
| 564 | - $this->miscService->log("Share '#" . $token . "' not found.", 0); |
|
| 564 | + $this->miscService->log("Share '#".$token."' not found.", 0); |
|
| 565 | 565 | throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share')); |
| 566 | 566 | } |
| 567 | 567 | } |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | $share = $this->createShareObject($data); |
| 571 | 571 | } catch (InvalidShare $e) { |
| 572 | 572 | $this->miscService->log( |
| 573 | - "Share Object '#" . $token . "' not created. " . json_encode($data), 0 |
|
| 573 | + "Share Object '#".$token."' not created. ".json_encode($data), 0 |
|
| 574 | 574 | ); |
| 575 | 575 | throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share')); |
| 576 | 576 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @param mixed $type |
|
| 97 | + * @param string $type |
|
| 98 | 98 | * |
| 99 | 99 | * @return GSEvent |
| 100 | 100 | */ |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0) |
| 213 | 213 | && strpos($remote, 'https://') !== 0 |
| 214 | 214 | ) { |
| 215 | - $remote = 'https://' . $remote; |
|
| 215 | + $remote = 'https://'.$remote; |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | return rtrim($remote, '/'); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | return false; |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | - throw new GSStatusException('GS and lookup are not configured : ' . $lookup . ', ' . $enabled); |
|
| 402 | + throw new GSStatusException('GS and lookup are not configured : '.$lookup.', '.$enabled); |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | $clef = $this->config->getSystemValue('gss.jwt.key', ''); |
@@ -440,6 +440,7 @@ |
||
| 440 | 440 | * @param string $type |
| 441 | 441 | * |
| 442 | 442 | * @throws GSStatusException |
| 443 | + * @return string |
|
| 443 | 444 | */ |
| 444 | 445 | public function getGSStatus(string $type = '') { |
| 445 | 446 | $enabled = $this->config->getSystemValueBool('gs.enabled', false); |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | RequestServerException | |
| 99 | 99 | RequestResultNotJsonException $e |
| 100 | 100 | ) { |
| 101 | - $this->miscService->log('Issue while retrieving instances from lookup: ' . $e->getMessage()); |
|
| 101 | + $this->miscService->log('Issue while retrieving instances from lookup: '.$e->getMessage()); |
|
| 102 | 102 | |
| 103 | 103 | return []; |
| 104 | 104 | } |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | /** |
| 409 | - * @return string |
|
| 409 | + * @return integer |
|
| 410 | 410 | */ |
| 411 | 411 | public function getType() { |
| 412 | 412 | return $this->type; |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | /** |
| 463 | - * @return array |
|
| 463 | + * @return Member[] |
|
| 464 | 464 | */ |
| 465 | 465 | public function getGroups() { |
| 466 | 466 | return $this->groups; |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | /** |
| 481 | - * @return array |
|
| 481 | + * @return FederatedLink[] |
|
| 482 | 482 | */ |
| 483 | 483 | public function getLinks() { |
| 484 | 484 | return $this->links; |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | // } |
| 515 | 515 | |
| 516 | 516 | /** |
| 517 | - * @param integer|string $type |
|
| 517 | + * @param string $type |
|
| 518 | 518 | * |
| 519 | 519 | * @return integer |
| 520 | 520 | */ |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | $wrappers = $this->gsUpstreamService->getEventsByToken($token); |
| 92 | 92 | } catch (Exception $e) { |
| 93 | 93 | $this->miscService->log( |
| 94 | - 'exception during async: ' . ['token' => $token, 'error' => $e->getMessage()] |
|
| 94 | + 'exception during async: '.['token' => $token, 'error' => $e->getMessage()] |
|
| 95 | 95 | ); |
| 96 | 96 | $this->fail(['token' => $token, 'error' => $e->getMessage()]); |
| 97 | 97 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | } catch (Exception $e) { |
| 142 | 142 | $this->miscService->log( |
| 143 | - get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1 |
|
| 143 | + get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1 |
|
| 144 | 144 | ); |
| 145 | 145 | throw $e; |
| 146 | 146 | } |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | $request->setDataSerialize($event); |
| 225 | 225 | |
| 226 | 226 | $result = $this->retrieveJson($request); |
| 227 | - $this->miscService->log('result ' . json_encode($result)); |
|
| 227 | + $this->miscService->log('result '.json_encode($result)); |
|
| 228 | 228 | if ($this->getInt('status', $result) === 0) { |
| 229 | 229 | throw new GlobalScaleEventException($this->get('error', $result)); |
| 230 | 230 | } |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | try { |
| 339 | 339 | $result = $this->retrieveJson($request); |
| 340 | - $this->miscService->log('result: ' . json_encode($result)); |
|
| 340 | + $this->miscService->log('result: '.json_encode($result)); |
|
| 341 | 341 | if ($this->getInt('status', $result, 0) !== 1) { |
| 342 | 342 | throw new RequestContentException('result status is not good'); |
| 343 | 343 | } |
@@ -349,7 +349,7 @@ |
||
| 349 | 349 | |
| 350 | 350 | |
| 351 | 351 | /** |
| 352 | - * @param array $circles |
|
| 352 | + * @param Circle[] $circles |
|
| 353 | 353 | * |
| 354 | 354 | * @throws GSStatusException |
| 355 | 355 | */ |
@@ -139,16 +139,16 @@ discard block |
||
| 139 | 139 | * @throws GlobalScaleEventException |
| 140 | 140 | */ |
| 141 | 141 | public function getGlobalScaleEvent(GSEvent $event): AGlobalScaleEvent { |
| 142 | - $class = '\OCA\Circles\\' . $event->getType(); |
|
| 142 | + $class = '\OCA\Circles\\'.$event->getType(); |
|
| 143 | 143 | try { |
| 144 | 144 | $gs = OC::$server->query($class); |
| 145 | 145 | if (!$gs instanceof AGlobalScaleEvent) { |
| 146 | - throw new GlobalScaleEventException($class . ' not an AGlobalScaleEvent'); |
|
| 146 | + throw new GlobalScaleEventException($class.' not an AGlobalScaleEvent'); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | return $gs; |
| 150 | 150 | } catch (QueryException $e) { |
| 151 | - throw new GlobalScaleEventException('AGlobalScaleEvent ' . $class . ' not found'); |
|
| 151 | + throw new GlobalScaleEventException('AGlobalScaleEvent '.$class.' not found'); |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | try { |
| 201 | 201 | $instances = $this->retrieveJson($request); |
| 202 | 202 | } catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $e) { |
| 203 | - $this->miscService->log('Issue while retrieving instances from lookup: ' . $e->getMessage()); |
|
| 203 | + $this->miscService->log('Issue while retrieving instances from lookup: '.$e->getMessage()); |
|
| 204 | 204 | |
| 205 | 205 | return []; |
| 206 | 206 | } |