@@ -148,7 +148,7 @@ |
||
| 148 | 148 | continue; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - $level = (int) $row['role'] === 1 ? Member::LEVEL_OWNER : Member::LEVEL_MEMBER; |
|
| 151 | + $level = (int)$row['role'] === 1 ? Member::LEVEL_OWNER : Member::LEVEL_MEMBER; |
|
| 152 | 152 | |
| 153 | 153 | if ($level === Member::LEVEL_OWNER) { |
| 154 | 154 | if (isset($this->circleHasAdmin[$this->circlesById[$row['group_id']]])) { |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | * generateEvent() |
| 283 | 283 | * Create an Activity Event with the basic settings for the app. |
| 284 | 284 | * |
| 285 | - * @param $type |
|
| 285 | + * @param string $type |
|
| 286 | 286 | * |
| 287 | 287 | * @return \OCP\Activity\IEvent |
| 288 | 288 | */ |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @param string $circleUniqueId |
| 87 | 87 | * @param string $groupId |
| 88 | 88 | * |
| 89 | - * @return array |
|
| 89 | + * @return Member[] |
|
| 90 | 90 | * @throws \Exception |
| 91 | 91 | */ |
| 92 | 92 | public function linkGroup($circleUniqueId, $groupId) { |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | /** |
| 113 | 113 | * Check if a fresh member can be generated (by linkGroup) |
| 114 | 114 | * |
| 115 | - * @param $circleId |
|
| 116 | - * @param $groupId |
|
| 115 | + * @param string $circleId |
|
| 116 | + * @param string $groupId |
|
| 117 | 117 | * |
| 118 | 118 | * @return null|Member |
| 119 | 119 | * @throws MemberAlreadyExistsException |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | * @param string $groupId |
| 149 | 149 | * @param int $level |
| 150 | 150 | * |
| 151 | - * @return array |
|
| 151 | + * @return Member[] |
|
| 152 | 152 | * @throws \Exception |
| 153 | 153 | */ |
| 154 | 154 | public function levelGroup($circleUniqueId, $groupId, $level) { |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * @param Circle $circle |
| 188 | 188 | * @param Member $group |
| 189 | - * @param $level |
|
| 189 | + * @param integer $level |
|
| 190 | 190 | * |
| 191 | 191 | * @throws \Exception |
| 192 | 192 | */ |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | * @param string $circleUniqueId |
| 214 | 214 | * @param string $groupId |
| 215 | 215 | * |
| 216 | - * @return array |
|
| 216 | + * @return Member[] |
|
| 217 | 217 | * @throws \Exception |
| 218 | 218 | */ |
| 219 | 219 | public function unlinkGroup($circleUniqueId, $groupId) { |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $searcher = \OC::$server->query((string)$container); |
| 89 | 89 | |
| 90 | 90 | if (!($searcher instanceof ISearch)) { |
| 91 | - $this->miscService->log('Search ' . $container . ' is not compatible exception'); |
|
| 91 | + $this->miscService->log('Search '.$container.' is not compatible exception'); |
|
| 92 | 92 | continue; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -303,6 +303,9 @@ |
||
| 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); |
@@ -128,7 +128,7 @@ |
||
| 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( |
@@ -91,7 +91,7 @@ |
||
| 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 | |
@@ -284,7 +284,7 @@ |
||
| 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 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @param $arr |
| 81 | - * @param $k |
|
| 81 | + * @param string $k |
|
| 82 | 82 | * |
| 83 | 83 | * @param string $default |
| 84 | 84 | * |
@@ -93,6 +93,9 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string[] $arr |
|
| 98 | + */ |
|
| 96 | 99 | public static function mustContains($data, $arr) { |
| 97 | 100 | if (!is_array($arr)) { |
| 98 | 101 | $arr = [$arr]; |
@@ -250,7 +253,7 @@ discard block |
||
| 250 | 253 | |
| 251 | 254 | |
| 252 | 255 | /** |
| 253 | - * @param $ident |
|
| 256 | + * @param string $ident |
|
| 254 | 257 | * |
| 255 | 258 | * @return mixed|string |
| 256 | 259 | * @deprecated |
@@ -438,8 +438,8 @@ |
||
| 438 | 438 | |
| 439 | 439 | /** |
| 440 | 440 | * @param string $userId |
| 441 | - * @param $shareType |
|
| 442 | - * @param Node $node |
|
| 441 | + * @param integer $shareType |
|
| 442 | + * @param Node|null $node |
|
| 443 | 443 | * @param int $limit |
| 444 | 444 | * @param int $offset |
| 445 | 445 | * |
@@ -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 | } |
@@ -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 | |