@@ -189,8 +189,8 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | - * @param $circleUniqueId |
|
| 193 | - * @param $remote |
|
| 192 | + * @param string $circleUniqueId |
|
| 193 | + * @param string $remote |
|
| 194 | 194 | * |
| 195 | 195 | * @return FederatedLink |
| 196 | 196 | */ |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | * |
| 282 | 282 | * Will parse the error reason returned by requestLink() and throw an Exception |
| 283 | 283 | * |
| 284 | - * @param $reason |
|
| 284 | + * @param string $reason |
|
| 285 | 285 | * |
| 286 | 286 | * @throws Exception |
| 287 | 287 | * @throws FederatedRemoteDoesNotAllowException |
@@ -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); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * @param $arr |
| 67 | - * @param $k |
|
| 67 | + * @param string $k |
|
| 68 | 68 | * |
| 69 | 69 | * @param string $default |
| 70 | 70 | * |
@@ -79,6 +79,9 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string[] $arr |
|
| 84 | + */ |
|
| 82 | 85 | public static function mustContains($data, $arr) { |
| 83 | 86 | if (!is_array($arr)) { |
| 84 | 87 | $arr = [$arr]; |
@@ -188,7 +191,7 @@ discard block |
||
| 188 | 191 | |
| 189 | 192 | |
| 190 | 193 | /** |
| 191 | - * @param $ident |
|
| 194 | + * @param string $ident |
|
| 192 | 195 | * |
| 193 | 196 | * @return mixed|string |
| 194 | 197 | */ |
@@ -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 | } |
@@ -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 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * @param $circleName |
|
| 181 | + * @param string $circleName |
|
| 182 | 182 | * @param IShare $share |
| 183 | 183 | * @param string $email |
| 184 | 184 | */ |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @param $subject |
| 234 | 234 | * @param $text |
| 235 | 235 | * @param $fileName |
| 236 | - * @param $link |
|
| 236 | + * @param string $link |
|
| 237 | 237 | * @param string $author |
| 238 | 238 | * @param string $circleName |
| 239 | 239 | * |
@@ -248,7 +248,7 @@ |
||
| 248 | 248 | $emailTemplate->addHeader(); |
| 249 | 249 | $emailTemplate->addHeading($subject, false); |
| 250 | 250 | $emailTemplate->addBodyText( |
| 251 | - htmlspecialchars($text) . '<br>' . htmlspecialchars($this->l10n->t('Click the button below to open it.')), $text |
|
| 251 | + htmlspecialchars($text).'<br>'.htmlspecialchars($this->l10n->t('Click the button below to open it.')), $text |
|
| 252 | 252 | ); |
| 253 | 253 | $emailTemplate->addBodyButton($this->l10n->t('Open »%s«', [htmlspecialchars($fileName)]), $link); |
| 254 | 254 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @param SharingFrame $frame |
| 152 | 152 | * @param Circle $circle |
| 153 | - * @param $broadcast |
|
| 153 | + * @param string|null $broadcast |
|
| 154 | 154 | */ |
| 155 | 155 | private function generateHeaders(SharingFrame $frame, Circle $circle, $broadcast) { |
| 156 | 156 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * Please use getFrameFromCircle(); |
| 190 | 190 | * |
| 191 | 191 | * @param string $circleUniqueId |
| 192 | - * @param $viewerId |
|
| 192 | + * @param string $viewerId |
|
| 193 | 193 | * |
| 194 | 194 | * @return SharingFrame[] |
| 195 | 195 | */ |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | try { |
| 280 | 280 | $client->post( |
| 281 | 281 | $this->generatePayloadDeliveryURL( |
| 282 | - $this->configService->getLocalAddress() . \OC::$WEBROOT |
|
| 282 | + $this->configService->getLocalAddress().\OC::$WEBROOT |
|
| 283 | 283 | ), [ |
| 284 | 284 | 'body' => $args, |
| 285 | 285 | 'timeout' => Application::CLIENT_TIMEOUT, |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | * @return string |
| 301 | 301 | */ |
| 302 | 302 | private function generatePayloadDeliveryURL($remote) { |
| 303 | - return $this->configService->generateRemoteHost($remote) . Application::REMOTE_URL_PAYLOAD; |
|
| 303 | + return $this->configService->generateRemoteHost($remote).Application::REMOTE_URL_PAYLOAD; |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | } catch (Exception $e) { |
| 376 | 376 | $this->miscService->log( |
| 377 | - 'fail to send frame to ' . $link->getAddress() . ' - ' . $e->getMessage() |
|
| 377 | + 'fail to send frame to '.$link->getAddress().' - '.$e->getMessage() |
|
| 378 | 378 | ); |
| 379 | 379 | } |
| 380 | 380 | } |
@@ -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 | * |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | continue; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - $replace['{' . $k . '}'] = $data[$k]['_parsed']; |
|
| 141 | + $replace['{'.$k.'}'] = $data[$k]['_parsed']; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | $line = strtr($line, $replace); |
@@ -300,9 +300,9 @@ discard block |
||
| 300 | 300 | */ |
| 301 | 301 | protected function generateExternalMemberParameter(Member $member) { |
| 302 | 302 | return [ |
| 303 | - 'type' => 'member_' . $member->getType(), |
|
| 303 | + 'type' => 'member_'.$member->getType(), |
|
| 304 | 304 | 'id' => $member->getUserId(), |
| 305 | - 'name' => $member->getDisplayName() . ' (' . $member->getTypeString() . ')', |
|
| 305 | + 'name' => $member->getDisplayName().' ('.$member->getTypeString().')', |
|
| 306 | 306 | '_parsed' => $member->getDisplayName() |
| 307 | 307 | ]; |
| 308 | 308 | } |
@@ -338,8 +338,8 @@ discard block |
||
| 338 | 338 | return [ |
| 339 | 339 | 'type' => 'circle', |
| 340 | 340 | 'id' => $link->getUniqueId(), |
| 341 | - 'name' => $link->getToken() . '@' . $link->getAddress(), |
|
| 342 | - '_parsed' => $link->getToken() . '@' . $link->getAddress() |
|
| 341 | + 'name' => $link->getToken().'@'.$link->getAddress(), |
|
| 342 | + '_parsed' => $link->getToken().'@'.$link->getAddress() |
|
| 343 | 343 | ]; |
| 344 | 344 | } |
| 345 | 345 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $expr->eq( |
| 182 | 182 | $qb->createNamedParameter($circleUniqueId), |
| 183 | 183 | $qb->createFunction( |
| 184 | - 'SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')' |
|
| 184 | + 'SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')' |
|
| 185 | 185 | ) |
| 186 | 186 | ) |
| 187 | 187 | ); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | $expr = $qb->expr(); |
| 255 | - $pf = '`' . $this->default_select_alias . '`.'; |
|
| 255 | + $pf = '`'.$this->default_select_alias.'`.'; |
|
| 256 | 256 | |
| 257 | 257 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 258 | 258 | $qb->selectAlias('u.user_id', 'viewer_userid') |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $expr->eq( |
| 265 | 265 | 'u.circle_id', |
| 266 | 266 | $qb->createFunction( |
| 267 | - 'SUBSTR(' . $pf . '`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH |
|
| 267 | + 'SUBSTR('.$pf.'`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH |
|
| 268 | 268 | . ')' |
| 269 | 269 | ) |
| 270 | 270 | ), |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | $expr = $qb->expr(); |
| 290 | - $pf = '`' . $this->default_select_alias . '`.'; |
|
| 290 | + $pf = '`'.$this->default_select_alias.'`.'; |
|
| 291 | 291 | |
| 292 | 292 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
| 293 | 293 | $qb->selectAlias('o.user_id', 'owner_userid') |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | $expr->andX( |
| 299 | 299 | $expr->eq( |
| 300 | 300 | $qb->createFunction( |
| 301 | - 'SUBSTR(' . $pf . '`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH |
|
| 301 | + 'SUBSTR('.$pf.'`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH |
|
| 302 | 302 | . ')' |
| 303 | 303 | ) |
| 304 | 304 | , 'o.circle_id' |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | $qb->expr() |
| 360 | 360 | ->eq( |
| 361 | 361 | $qb->createFunction( |
| 362 | - 'SUBSTR(`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')' |
|
| 362 | + 'SUBSTR(`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')' |
|
| 363 | 363 | ), |
| 364 | 364 | $qb->createNamedParameter($circleUniqueId) |
| 365 | 365 | ) |