@@ -173,19 +173,19 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
| 175 | 175 | if ($this->input->getOption('all')) { |
| 176 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
| 176 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
| 177 | 177 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 178 | 178 | $this->output->writeln(''); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if ($this->input->getOption('all')) { |
| 182 | 182 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
| 183 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
| 183 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
| 184 | 184 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 185 | 185 | $this->output->writeln(''); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
| 188 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
| 189 | 189 | foreach ($webfinger->getLinks() as $link) { |
| 190 | 190 | $app = $link->getProperty('name'); |
| 191 | 191 | $ver = $link->getProperty('version'); |
@@ -193,14 +193,14 @@ discard block |
||
| 193 | 193 | $app .= ' '; |
| 194 | 194 | } |
| 195 | 195 | if ($ver !== '') { |
| 196 | - $ver = 'v' . $ver; |
|
| 196 | + $ver = 'v'.$ver; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
| 199 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
| 200 | 200 | } |
| 201 | 201 | $this->output->writeln(''); |
| 202 | 202 | |
| 203 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
| 203 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
| 204 | 204 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
| 205 | 205 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 206 | 206 | $this->output->writeln(''); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | $tempUid = $resource->g('uid'); |
| 210 | 210 | $this->output->writeln( |
| 211 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
| 211 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | 214 | try { |
@@ -217,15 +217,15 @@ discard block |
||
| 217 | 217 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
| 218 | 218 | } catch (SignatureException $e) { |
| 219 | 219 | $this->output->writeln( |
| 220 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
| 220 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
| 221 | 221 | ); |
| 222 | 222 | |
| 223 | 223 | return; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
| 226 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
| 227 | 227 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
| 228 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
| 228 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
| 229 | 229 | |
| 230 | 230 | return; |
| 231 | 231 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $this->output->writeln(''); |
| 234 | 234 | |
| 235 | 235 | $testUrl = $resource->g('test'); |
| 236 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
| 236 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
| 237 | 237 | |
| 238 | 238 | try { |
| 239 | 239 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -255,18 +255,18 @@ discard block |
||
| 255 | 255 | $this->output->writeln(''); |
| 256 | 256 | |
| 257 | 257 | $this->output->writeln(' * Clear Signature: '); |
| 258 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
| 258 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
| 259 | 259 | $this->output->writeln(''); |
| 260 | 260 | |
| 261 | 261 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
| 262 | 262 | $this->output->writeln( |
| 263 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
| 263 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
| 264 | 264 | ); |
| 265 | 265 | $this->output->writeln(''); |
| 266 | 266 | |
| 267 | 267 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
| 268 | 268 | $code = $result->getStatusCode(); |
| 269 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
| 269 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
| 270 | 270 | $this->output->writeln( |
| 271 | 271 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
| 272 | 272 | ); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $stored = new RemoteInstance(); |
| 289 | 289 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
| 290 | 290 | $this->output->writeln( |
| 291 | - '<info>The remote instance ' . $host |
|
| 291 | + '<info>The remote instance '.$host |
|
| 292 | 292 | . ' is already known with this current identity</info>' |
| 293 | 293 | ); |
| 294 | 294 | |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | if ($remoteSignatory->getType() !== $stored->getType()) { |
| 300 | 300 | $this->output->writeln( |
| 301 | - '- updating type from ' . $stored->getType() . ' to ' |
|
| 301 | + '- updating type from '.$stored->getType().' to ' |
|
| 302 | 302 | . $remoteSignatory->getType() |
| 303 | 303 | ); |
| 304 | 304 | $this->remoteStreamService->update( |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
| 310 | 310 | $this->output->writeln( |
| 311 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
| 311 | + '- updating host from '.$stored->getInstance().' to ' |
|
| 312 | 312 | . $remoteSignatory->getInstance() |
| 313 | 313 | ); |
| 314 | 314 | $this->remoteStreamService->update( |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | if ($remoteSignatory->getId() !== $stored->getId()) { |
| 319 | 319 | $this->output->writeln( |
| 320 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
| 320 | + '- updating href/Id from '.$stored->getId().' to ' |
|
| 321 | 321 | . $remoteSignatory->getId() |
| 322 | 322 | ); |
| 323 | 323 | $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) ', |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $helper = $this->getHelper('question'); |
| 373 | 373 | |
| 374 | 374 | $this->output->writeln( |
| 375 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
| 375 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
| 376 | 376 | . '</info> is known but <error>its identity has changed.</error>' |
| 377 | 377 | ); |
| 378 | 378 | $this->output->writeln( |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | private function verifyGSInstances(): void { |
| 435 | 435 | $instances = $this->globalScaleService->getGlobalScaleInstances(); |
| 436 | 436 | $known = array_map( |
| 437 | - function (RemoteInstance $instance): string { |
|
| 437 | + function(RemoteInstance $instance): string { |
|
| 438 | 438 | return $instance->getInstance(); |
| 439 | 439 | }, $this->remoteRequest->getFromType(RemoteInstance::TYPE_GLOBALSCALE) |
| 440 | 440 | ); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | * @param string $instance |
| 451 | 451 | */ |
| 452 | 452 | private function syncGSInstance(string $instance): void { |
| 453 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
| 453 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
| 454 | 454 | if ($this->configService->isLocalInstance($instance)) { |
| 455 | 455 | $this->output->writeln('<comment>instance is local</comment>'); |
| 456 | 456 | return; |
@@ -465,8 +465,8 @@ discard block |
||
| 465 | 465 | ); |
| 466 | 466 | $this->output->writeln('<info>ok</info>'); |
| 467 | 467 | } catch (Exception $e) { |
| 468 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
| 469 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
| 468 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
| 469 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
| 470 | 470 | } |
| 471 | 471 | } |
| 472 | 472 | |
@@ -484,12 +484,12 @@ discard block |
||
| 484 | 484 | try { |
| 485 | 485 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
| 486 | 486 | if ($current->getUid(true) === $instance->getUid(true)) { |
| 487 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
| 487 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
| 488 | 488 | } else { |
| 489 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
| 489 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
| 490 | 490 | } |
| 491 | 491 | } catch (Exception $e) { |
| 492 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
| 492 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | $table->appendRow( |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 519 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | /** |
@@ -529,6 +529,6 @@ discard block |
||
| 529 | 529 | } |
| 530 | 530 | } |
| 531 | 531 | |
| 532 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 532 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 533 | 533 | } |
| 534 | 534 | } |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | try { |
| 253 | 253 | $circleService->getCircle($uniqueId); // checking current user have access to said circle |
| 254 | 254 | $files = array_map( |
| 255 | - function (ShareWrapper $wrapper): int { |
|
| 255 | + function(ShareWrapper $wrapper): int { |
|
| 256 | 256 | return $wrapper->getFileSource(); |
| 257 | 257 | }, $shareWrapperService->getSharesToCircle($uniqueId) |
| 258 | 258 | ); |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | public function registerFilesNavigation() { |
| 169 | 169 | $appManager = FilesApp::getNavigationManager(); |
| 170 | 170 | $appManager->add( |
| 171 | - function () { |
|
| 171 | + function() { |
|
| 172 | 172 | $l = OC::$server->getL10N('circles'); |
| 173 | 173 | |
| 174 | 174 | return [ |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | $path = $this->getPath(); |
| 459 | - [$storageType,] = explode('::', $this->getStorage(), 2); |
|
| 459 | + [$storageType, ] = explode('::', $this->getStorage(), 2); |
|
| 460 | 460 | |
| 461 | 461 | if ($path === '') { |
| 462 | 462 | // we only accept empty path on external storage |
@@ -508,29 +508,29 @@ discard block |
||
| 508 | 508 | * @throws FileCacheNotFoundException |
| 509 | 509 | */ |
| 510 | 510 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 511 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
| 511 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
| 512 | 512 | throw new FileCacheNotFoundException(); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
| 516 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
| 517 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
| 518 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
| 519 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
| 520 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
| 521 | - $this->setName($this->get($prefix . 'name', $data)); |
|
| 522 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
| 523 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
| 524 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
| 525 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
| 526 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
| 527 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
| 528 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
| 529 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
| 530 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
| 515 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
| 516 | + $this->setPath($this->get($prefix.'path', $data)); |
|
| 517 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
| 518 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
| 519 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
| 520 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
| 521 | + $this->setName($this->get($prefix.'name', $data)); |
|
| 522 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
| 523 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
| 524 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
| 525 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
| 526 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
| 527 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
| 528 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
| 529 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
| 530 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
| 531 | 531 | |
| 532 | 532 | // small hack as there is no reason to call a recursive method for a single entry from the table |
| 533 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
| 533 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
| 534 | 534 | |
| 535 | 535 | return $this; |
| 536 | 536 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $event->setSubject('circle_create', ['circle' => json_encode($circle)]); |
| 76 | 76 | |
| 77 | 77 | $this->userManager->callForSeenUsers( |
| 78 | - function ($user) use ($event) { |
|
| 78 | + function($user) use ($event) { |
|
| 79 | 79 | /** @var IUser $user */ |
| 80 | 80 | $this->publishEvent($event, [$user]); |
| 81 | 81 | } |
@@ -184,8 +184,8 @@ |
||
| 184 | 184 | $qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe); |
| 185 | 185 | if (!is_null($initiator)) { |
| 186 | 186 | $qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator); |
| 187 | - $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc'); |
|
| 188 | - $qb->addOrderBy(CoreQueryBuilder::CIRCLE . '.display_name', 'asc'); |
|
| 187 | + $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR).'.level', 'desc'); |
|
| 188 | + $qb->addOrderBy(CoreQueryBuilder::CIRCLE.'.display_name', 'asc'); |
|
| 189 | 189 | } |
| 190 | 190 | if ($probe->hasFilterMember()) { |
| 191 | 191 | $qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember()); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $this->parseAsNonMember($event, $circle); |
| 69 | 69 | $this->parseAsMember($event, $circle, $params); |
| 70 | 70 | $this->parseAsModerator($event, $circle, $params); |
| 71 | - } catch (FakeException|InvalidItemException $e) { |
|
| 71 | + } catch (FakeException | InvalidItemException $e) { |
|
| 72 | 72 | /** clean exit */ |
| 73 | 73 | } |
| 74 | 74 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | throw new Exception('Please specify a --type for the test'); |
| 131 | 131 | } |
| 132 | 132 | if ($test !== '' && !in_array($type, self::$checks)) { |
| 133 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
| 133 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | $output->writeln(''); |
| 189 | - $output->writeln('* testing current address: ' . $test); |
|
| 189 | + $output->writeln('* testing current address: '.$test); |
|
| 190 | 190 | |
| 191 | 191 | try { |
| 192 | 192 | $this->setupLoopback($input, $output, $test); |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | continue; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 224 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
| 223 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 224 | + $output->writeln('* testing address: '.$loopback.' '); |
|
| 225 | 225 | |
| 226 | 226 | try { |
| 227 | 227 | $this->setupLoopback($input, $output, $loopback); |
@@ -292,8 +292,8 @@ discard block |
||
| 292 | 292 | $test = new FederatedEvent(LoopbackTest::class); |
| 293 | 293 | $this->federatedEventService->newEvent($test); |
| 294 | 294 | $output->writeln( |
| 295 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
| 296 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
| 295 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
| 296 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
| 297 | 297 | ); |
| 298 | 298 | |
| 299 | 299 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -312,18 +312,18 @@ discard block |
||
| 312 | 312 | |
| 313 | 313 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
| 314 | 314 | if ($checkVerify === LoopbackTest::VERIFY) { |
| 315 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
| 315 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
| 316 | 316 | } else { |
| 317 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
| 317 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
| 318 | 318 | |
| 319 | 319 | return false; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | $checkManage = $wrapper->getResult()->gInt('manage'); |
| 323 | 323 | if ($checkManage === LoopbackTest::MANAGE) { |
| 324 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
| 324 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
| 325 | 325 | } else { |
| 326 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
| 326 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
| 327 | 327 | |
| 328 | 328 | return false; |
| 329 | 329 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 362 | 362 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
| 363 | 363 | $output->writeln( |
| 364 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 364 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 365 | 365 | ); |
| 366 | 366 | } |
| 367 | 367 | |
@@ -413,8 +413,8 @@ discard block |
||
| 413 | 413 | continue; |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 417 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 416 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 417 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 418 | 418 | |
| 419 | 419 | $question = new ConfirmationQuestion( |
| 420 | 420 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -433,9 +433,9 @@ discard block |
||
| 433 | 433 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 434 | 434 | ); |
| 435 | 435 | $output->writeln( |
| 436 | - ' curl -L "' . $internal |
|
| 436 | + ' curl -L "'.$internal |
|
| 437 | 437 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 438 | - . $testToken . '"' |
|
| 438 | + . $testToken.'"' |
|
| 439 | 439 | ); |
| 440 | 440 | |
| 441 | 441 | $output->writeln('paste the result here: '); |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | if ($pastedHref !== $href) { |
| 471 | 471 | $output->writeln( |
| 472 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 472 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 473 | 473 | . $href |
| 474 | 474 | ); |
| 475 | 475 | continue; |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 482 | 482 | ); |
| 483 | 483 | $output->writeln( |
| 484 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 484 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 485 | 485 | ); |
| 486 | 486 | |
| 487 | 487 | $output->writeln('paste the result here: '); |
@@ -497,9 +497,9 @@ discard block |
||
| 497 | 497 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 498 | 498 | $output->writeln( |
| 499 | 499 | '<error>The returned data (' |
| 500 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 500 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 501 | 501 | . ') are not the one expected: </error>' |
| 502 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 502 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 503 | 503 | ); |
| 504 | 504 | continue; |
| 505 | 505 | } |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | |
| 526 | 526 | $output->writeln(''); |
| 527 | 527 | $question = new ConfirmationQuestion( |
| 528 | - '- Do you want to save <info>' . $internal |
|
| 528 | + '- Do you want to save <info>'.$internal |
|
| 529 | 529 | . '</info> as your <info>internal</info> address ? (y/N) ', |
| 530 | 530 | false, '/^(y|Y)/i' |
| 531 | 531 | ); |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
| 542 | 542 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
| 543 | 543 | |
| 544 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
| 544 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | /** |
@@ -591,8 +591,8 @@ discard block |
||
| 591 | 591 | continue; |
| 592 | 592 | } |
| 593 | 593 | |
| 594 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 595 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 594 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 595 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 596 | 596 | |
| 597 | 597 | $question = new ConfirmationQuestion( |
| 598 | 598 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -611,9 +611,9 @@ discard block |
||
| 611 | 611 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 612 | 612 | ); |
| 613 | 613 | $output->writeln( |
| 614 | - ' curl -L "' . $frontal |
|
| 614 | + ' curl -L "'.$frontal |
|
| 615 | 615 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 616 | - . $testToken . '"' |
|
| 616 | + . $testToken.'"' |
|
| 617 | 617 | ); |
| 618 | 618 | |
| 619 | 619 | $output->writeln('paste the result here: '); |
@@ -647,7 +647,7 @@ discard block |
||
| 647 | 647 | |
| 648 | 648 | if ($pastedHref !== $href) { |
| 649 | 649 | $output->writeln( |
| 650 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 650 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 651 | 651 | . $href |
| 652 | 652 | ); |
| 653 | 653 | continue; |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 660 | 660 | ); |
| 661 | 661 | $output->writeln( |
| 662 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 662 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 663 | 663 | ); |
| 664 | 664 | |
| 665 | 665 | $output->writeln('paste the result here: '); |
@@ -675,9 +675,9 @@ discard block |
||
| 675 | 675 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 676 | 676 | $output->writeln( |
| 677 | 677 | '<error>The returned data (' |
| 678 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 678 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 679 | 679 | . ') are not the one expected: </error>' |
| 680 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 680 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 681 | 681 | ); |
| 682 | 682 | continue; |
| 683 | 683 | } |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | |
| 704 | 704 | $output->writeln(''); |
| 705 | 705 | $question = new ConfirmationQuestion( |
| 706 | - '- Do you want to save <info>' . $frontal |
|
| 706 | + '- Do you want to save <info>'.$frontal |
|
| 707 | 707 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
| 708 | 708 | false, '/^(y|Y)/i' |
| 709 | 709 | ); |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
| 720 | 720 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
| 721 | 721 | |
| 722 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
| 722 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
| 723 | 723 | } |
| 724 | 724 | |
| 725 | 725 | /** |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
| 745 | 745 | } |
| 746 | 746 | |
| 747 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 747 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 748 | 748 | |
| 749 | 749 | try { |
| 750 | 750 | $this->doRequest($request); |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | $color = 'info'; |
| 756 | 756 | } |
| 757 | 757 | |
| 758 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
| 758 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
| 759 | 759 | if ($result->getStatusCode() === 200) { |
| 760 | 760 | return true; |
| 761 | 761 | } |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | |
| 779 | 779 | $output->writeln(''); |
| 780 | 780 | $output->writeln( |
| 781 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 781 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 782 | 782 | ); |
| 783 | 783 | |
| 784 | 784 | $helper = $this->getHelper('question'); |
@@ -795,8 +795,8 @@ discard block |
||
| 795 | 795 | |
| 796 | 796 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 797 | 797 | $output->writeln( |
| 798 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 799 | - . $address . '\'</info> stored in database' |
|
| 798 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 799 | + . $address.'\'</info> stored in database' |
|
| 800 | 800 | ); |
| 801 | 801 | } |
| 802 | 802 | |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | $path = rtrim($path, '/'); |
| 824 | 824 | |
| 825 | 825 | if (!is_null($cloudIdPort)) { |
| 826 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
| 826 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | return [$scheme, $cloudId, $path]; |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | 'version' => $this->configService->getAppValue('installed_version'), |
| 88 | 88 | 'api' => Application::APP_API |
| 89 | 89 | ]; |
| 90 | - } catch (UnknownInterfaceException|SignatoryException $e) { |
|
| 90 | + } catch (UnknownInterfaceException | SignatoryException $e) { |
|
| 91 | 91 | return $response; |
| 92 | 92 | } |
| 93 | 93 | |