@@ -230,13 +230,13 @@ |
||
| 230 | 230 | throw new UnknownInterfaceException('misconfigured scheme'); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - $base = $scheme . '://' . $this->getCloudInstance(); |
|
| 233 | + $base = $scheme.'://'.$this->getCloudInstance(); |
|
| 234 | 234 | |
| 235 | 235 | if ($route === '') { |
| 236 | 236 | return $base; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
| 239 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
@@ -176,19 +176,19 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
| 178 | 178 | if ($this->input->getOption('all')) { |
| 179 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
| 179 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
| 180 | 180 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 181 | 181 | $this->output->writeln(''); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | if ($this->input->getOption('all')) { |
| 185 | 185 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
| 186 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
| 186 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
| 187 | 187 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 188 | 188 | $this->output->writeln(''); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
| 191 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
| 192 | 192 | foreach ($webfinger->getLinks() as $link) { |
| 193 | 193 | $app = $link->getProperty('name'); |
| 194 | 194 | $ver = $link->getProperty('version'); |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | $app .= ' '; |
| 197 | 197 | } |
| 198 | 198 | if ($ver !== '') { |
| 199 | - $ver = 'v' . $ver; |
|
| 199 | + $ver = 'v'.$ver; |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
| 202 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
| 203 | 203 | } |
| 204 | 204 | $this->output->writeln(''); |
| 205 | 205 | |
| 206 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
| 206 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
| 207 | 207 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
| 208 | 208 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 209 | 209 | $this->output->writeln(''); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $tempUid = $resource->g('uid'); |
| 213 | 213 | $this->output->writeln( |
| 214 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
| 214 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
| 215 | 215 | ); |
| 216 | 216 | |
| 217 | 217 | try { |
@@ -219,15 +219,15 @@ discard block |
||
| 219 | 219 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
| 220 | 220 | } catch (SignatureException $e) { |
| 221 | 221 | $this->output->writeln( |
| 222 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
| 222 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
| 223 | 223 | ); |
| 224 | 224 | |
| 225 | 225 | return; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
| 228 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
| 229 | 229 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
| 230 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
| 230 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
| 231 | 231 | |
| 232 | 232 | return; |
| 233 | 233 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $this->output->writeln(''); |
| 236 | 236 | |
| 237 | 237 | $testUrl = $resource->g('test'); |
| 238 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
| 238 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
| 239 | 239 | |
| 240 | 240 | try { |
| 241 | 241 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -257,18 +257,18 @@ discard block |
||
| 257 | 257 | $this->output->writeln(''); |
| 258 | 258 | |
| 259 | 259 | $this->output->writeln(' * Clear Signature: '); |
| 260 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
| 260 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
| 261 | 261 | $this->output->writeln(''); |
| 262 | 262 | |
| 263 | 263 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
| 264 | 264 | $this->output->writeln( |
| 265 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
| 265 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
| 266 | 266 | ); |
| 267 | 267 | $this->output->writeln(''); |
| 268 | 268 | |
| 269 | 269 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
| 270 | 270 | $code = $result->getStatusCode(); |
| 271 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
| 271 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
| 272 | 272 | $this->output->writeln( |
| 273 | 273 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
| 274 | 274 | ); |
@@ -290,13 +290,13 @@ discard block |
||
| 290 | 290 | $stored = new RemoteInstance(); |
| 291 | 291 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
| 292 | 292 | $this->output->writeln( |
| 293 | - '<info>The remote instance ' . $host |
|
| 293 | + '<info>The remote instance '.$host |
|
| 294 | 294 | . ' is already known with this current identity</info>' |
| 295 | 295 | ); |
| 296 | 296 | |
| 297 | 297 | if ($remoteSignatory->getType() !== $stored->getType()) { |
| 298 | 298 | $this->output->writeln( |
| 299 | - '- updating type from ' . $stored->getType() . ' to ' |
|
| 299 | + '- updating type from '.$stored->getType().' to ' |
|
| 300 | 300 | . $remoteSignatory->getType() |
| 301 | 301 | ); |
| 302 | 302 | $this->remoteStreamService->update( |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
| 308 | 308 | $this->output->writeln( |
| 309 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
| 309 | + '- updating host from '.$stored->getInstance().' to ' |
|
| 310 | 310 | . $remoteSignatory->getInstance() |
| 311 | 311 | ); |
| 312 | 312 | $this->remoteStreamService->update( |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | } |
| 316 | 316 | if ($remoteSignatory->getId() !== $stored->getId()) { |
| 317 | 317 | $this->output->writeln( |
| 318 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
| 318 | + '- updating href/Id from '.$stored->getId().' to ' |
|
| 319 | 319 | . $remoteSignatory->getId() |
| 320 | 320 | ); |
| 321 | 321 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -341,10 +341,10 @@ discard block |
||
| 341 | 341 | $helper = $this->getHelper('question'); |
| 342 | 342 | |
| 343 | 343 | $this->output->writeln( |
| 344 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
| 344 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
| 345 | 345 | ); |
| 346 | 346 | $question = new ConfirmationQuestion( |
| 347 | - 'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType() |
|
| 347 | + 'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType() |
|
| 348 | 348 | . '</comment>\' using interface \'<comment>' |
| 349 | 349 | . InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()] |
| 350 | 350 | . '</comment>\' ? (y/N) ', |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $helper = $this->getHelper('question'); |
| 370 | 370 | |
| 371 | 371 | $this->output->writeln( |
| 372 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
| 372 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
| 373 | 373 | . '</info> is known but <error>its identity has changed.</error>' |
| 374 | 374 | ); |
| 375 | 375 | $this->output->writeln( |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
| 450 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
| 451 | 451 | try { |
| 452 | 452 | $this->remoteStreamService->addRemoteInstance( |
| 453 | 453 | $instance, |
@@ -457,8 +457,8 @@ discard block |
||
| 457 | 457 | ); |
| 458 | 458 | $this->output->writeln('<info>ok</info>'); |
| 459 | 459 | } catch (Exception $e) { |
| 460 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
| 461 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
| 460 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
| 461 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
| 462 | 462 | } |
| 463 | 463 | } |
| 464 | 464 | |
@@ -476,12 +476,12 @@ discard block |
||
| 476 | 476 | try { |
| 477 | 477 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
| 478 | 478 | if ($current->getUid(true) === $instance->getUid(true)) { |
| 479 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
| 479 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
| 480 | 480 | } else { |
| 481 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
| 481 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
| 482 | 482 | } |
| 483 | 483 | } catch (Exception $e) { |
| 484 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
| 484 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | $table->appendRow( |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 510 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | /** |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 523 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | } |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $tables = $schema->getTables(); |
| 79 | 79 | foreach ($tables as $table) { |
| 80 | 80 | $tableName = $table->getName(); |
| 81 | - if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix . 'circles_') { |
|
| 81 | + if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix.'circles_') { |
|
| 82 | 82 | $tableName = substr($tableName, strlen($prefix)); |
| 83 | 83 | $schema->dropTable($tableName); |
| 84 | 84 | } |
@@ -104,16 +104,16 @@ |
||
| 104 | 104 | } catch (Exception $e) { |
| 105 | 105 | $this->e($e); |
| 106 | 106 | |
| 107 | - return $membership->getSingleId() . ' is not ' . $inheritance . ' of ' |
|
| 108 | - . $membership->getCircleId() . ' anymore'; |
|
| 107 | + return $membership->getSingleId().' is not '.$inheritance.' of ' |
|
| 108 | + . $membership->getCircleId().' anymore'; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()] |
|
| 112 | - . ') is not ' . $inheritance . ' of ' . $membership->getCircleId() . ' anymore'; |
|
| 111 | + return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()] |
|
| 112 | + . ') is not '.$inheritance.' of '.$membership->getCircleId().' anymore'; |
|
| 113 | 113 | }, $event->getMemberships() |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - $this->log(3, $prefix . implode('. ', $memberships)); |
|
| 116 | + $this->log(3, $prefix.implode('. ', $memberships)); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | } |
@@ -104,16 +104,16 @@ |
||
| 104 | 104 | } catch (Exception $e) { |
| 105 | 105 | $this->e($e); |
| 106 | 106 | |
| 107 | - return $membership->getSingleId() . ' is now ' . $inheritance . ' of ' |
|
| 107 | + return $membership->getSingleId().' is now '.$inheritance.' of ' |
|
| 108 | 108 | . $membership->getCircleId(); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()] |
|
| 112 | - . ') is now ' . $inheritance . ' of ' . $membership->getCircleId(); |
|
| 111 | + return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()] |
|
| 112 | + . ') is now '.$inheritance.' of '.$membership->getCircleId(); |
|
| 113 | 113 | }, $event->getMemberships() |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - $this->log(3, $prefix . implode('. ', $memberships)); |
|
| 116 | + $this->log(3, $prefix.implode('. ', $memberships)); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | } |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | $circle = new Circle(); |
| 145 | 145 | $circle->importFromDatabase( |
| 146 | 146 | $data, |
| 147 | - CoreQueryBuilder::HELPER . '_' . CoreQueryBuilder::CIRCLE . '_' |
|
| 147 | + CoreQueryBuilder::HELPER.'_'.CoreQueryBuilder::CIRCLE.'_' |
|
| 148 | 148 | ); |
| 149 | 149 | |
| 150 | 150 | return $circle; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | - * @param mixed $class |
|
| 136 | + * @param string $class |
|
| 137 | 137 | * |
| 138 | 138 | * @return self |
| 139 | 139 | */ |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | |
| 455 | 455 | /** |
| 456 | 456 | * @param string $key |
| 457 | - * @param array $result |
|
| 457 | + * @param \OCA\Circles\Model\ShareWrapper[] $result |
|
| 458 | 458 | * |
| 459 | 459 | * @return $this |
| 460 | 460 | */ |
@@ -251,16 +251,16 @@ |
||
| 251 | 251 | try { |
| 252 | 252 | $test = new ReflectionClass($class); |
| 253 | 253 | } catch (ReflectionException $e) { |
| 254 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
| 254 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
| 258 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
| 258 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | $item = OC::$server->get($class); |
| 262 | 262 | if (!($item instanceof IFederatedItem)) { |
| 263 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
| 263 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | $this->sendMailExistingShares($template, $author, $recipient); |
| 243 | 243 | $this->sendPasswordExistingShares($author, $recipient, $password); |
| 244 | 244 | } catch (Exception $e) { |
| 245 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 245 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
| 246 | 246 | } |
| 247 | 247 | } |
| 248 | 248 | |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
| 393 | 393 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
| 394 | 394 | |
| 395 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
| 395 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
| 396 | 396 | |
| 397 | 397 | $plainBodyPart = $this->l10n->t( |
| 398 | 398 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 435 | 435 | if ($authorEmail !== null) { |
| 436 | 436 | $message->setReplyTo([$authorEmail => $authorName]); |
| 437 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 437 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 438 | 438 | } else { |
| 439 | 439 | $emailTemplate->addFooter(); |
| 440 | 440 | } |