@@ -154,19 +154,19 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
| 156 | 156 | if ($this->input->getOption('all')) { |
| 157 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
| 157 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
| 158 | 158 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 159 | 159 | $this->output->writeln(''); |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if ($this->input->getOption('all')) { |
| 163 | 163 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
| 164 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
| 164 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
| 165 | 165 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 166 | 166 | $this->output->writeln(''); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
| 169 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
| 170 | 170 | foreach ($webfinger->getLinks() as $link) { |
| 171 | 171 | $app = $link->getProperty('name'); |
| 172 | 172 | $ver = $link->getProperty('version'); |
@@ -174,14 +174,14 @@ discard block |
||
| 174 | 174 | $app .= ' '; |
| 175 | 175 | } |
| 176 | 176 | if ($ver !== '') { |
| 177 | - $ver = 'v' . $ver; |
|
| 177 | + $ver = 'v'.$ver; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
| 180 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
| 181 | 181 | } |
| 182 | 182 | $this->output->writeln(''); |
| 183 | 183 | |
| 184 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
| 184 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
| 185 | 185 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
| 186 | 186 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
| 187 | 187 | $this->output->writeln(''); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | $tempUid = $resource->g('uid'); |
| 191 | 191 | $this->output->writeln( |
| 192 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
| 192 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
| 193 | 193 | ); |
| 194 | 194 | |
| 195 | 195 | try { |
@@ -198,15 +198,15 @@ discard block |
||
| 198 | 198 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
| 199 | 199 | } catch (SignatureException $e) { |
| 200 | 200 | $this->output->writeln( |
| 201 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
| 201 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
| 202 | 202 | ); |
| 203 | 203 | |
| 204 | 204 | return; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
| 207 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
| 208 | 208 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
| 209 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
| 209 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
| 210 | 210 | |
| 211 | 211 | return; |
| 212 | 212 | } |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | $this->output->writeln(''); |
| 215 | 215 | |
| 216 | 216 | $testUrl = $resource->g('test'); |
| 217 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
| 217 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
| 218 | 218 | |
| 219 | 219 | try { |
| 220 | 220 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -236,18 +236,18 @@ discard block |
||
| 236 | 236 | $this->output->writeln(''); |
| 237 | 237 | |
| 238 | 238 | $this->output->writeln(' * Clear Signature: '); |
| 239 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
| 239 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
| 240 | 240 | $this->output->writeln(''); |
| 241 | 241 | |
| 242 | 242 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
| 243 | 243 | $this->output->writeln( |
| 244 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
| 244 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
| 245 | 245 | ); |
| 246 | 246 | $this->output->writeln(''); |
| 247 | 247 | |
| 248 | 248 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
| 249 | 249 | $code = $result->getStatusCode(); |
| 250 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . ((string)$code) . '</info>' : $code)); |
|
| 250 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.((string)$code).'</info>' : $code)); |
|
| 251 | 251 | $this->output->writeln( |
| 252 | 252 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
| 253 | 253 | ); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $stored = new RemoteInstance(); |
| 270 | 270 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
| 271 | 271 | $this->output->writeln( |
| 272 | - '<info>The remote instance ' . $host |
|
| 272 | + '<info>The remote instance '.$host |
|
| 273 | 273 | . ' is already known with this current identity</info>' |
| 274 | 274 | ); |
| 275 | 275 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | if ($remoteSignatory->getType() !== $stored->getType()) { |
| 281 | 281 | $this->output->writeln( |
| 282 | - '- updating type from ' . $stored->getType() . ' to ' |
|
| 282 | + '- updating type from '.$stored->getType().' to ' |
|
| 283 | 283 | . $remoteSignatory->getType() |
| 284 | 284 | ); |
| 285 | 285 | $this->remoteStreamService->update( |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
| 291 | 291 | $this->output->writeln( |
| 292 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
| 292 | + '- updating host from '.$stored->getInstance().' to ' |
|
| 293 | 293 | . $remoteSignatory->getInstance() |
| 294 | 294 | ); |
| 295 | 295 | $this->remoteStreamService->update( |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | } |
| 299 | 299 | if ($remoteSignatory->getId() !== $stored->getId()) { |
| 300 | 300 | $this->output->writeln( |
| 301 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
| 301 | + '- updating href/Id from '.$stored->getId().' to ' |
|
| 302 | 302 | . $remoteSignatory->getId() |
| 303 | 303 | ); |
| 304 | 304 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -323,10 +323,10 @@ discard block |
||
| 323 | 323 | $helper = $this->getHelper('question'); |
| 324 | 324 | |
| 325 | 325 | $this->output->writeln( |
| 326 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
| 326 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
| 327 | 327 | ); |
| 328 | 328 | $question = new ConfirmationQuestion( |
| 329 | - 'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType() |
|
| 329 | + 'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType() |
|
| 330 | 330 | . '</comment>\' using interface \'<comment>' |
| 331 | 331 | . InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()] |
| 332 | 332 | . '</comment>\' ? (y/N) ', |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $helper = $this->getHelper('question'); |
| 356 | 356 | |
| 357 | 357 | $this->output->writeln( |
| 358 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
| 358 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
| 359 | 359 | . '</info> is known but <error>its identity has changed.</error>' |
| 360 | 360 | ); |
| 361 | 361 | $this->output->writeln( |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | private function verifyGSInstances(): void { |
| 418 | 418 | $instances = $this->globalScaleService->getGlobalScaleInstances(); |
| 419 | 419 | $known = array_map( |
| 420 | - function (RemoteInstance $instance): string { |
|
| 420 | + function(RemoteInstance $instance): string { |
|
| 421 | 421 | return $instance->getInstance(); |
| 422 | 422 | }, $this->remoteRequest->getFromType(RemoteInstance::TYPE_GLOBALSCALE) |
| 423 | 423 | ); |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | * @param string $instance |
| 434 | 434 | */ |
| 435 | 435 | private function syncGSInstance(string $instance): void { |
| 436 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
| 436 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
| 437 | 437 | if ($this->configService->isLocalInstance($instance)) { |
| 438 | 438 | $this->output->writeln('<comment>instance is local</comment>'); |
| 439 | 439 | return; |
@@ -448,8 +448,8 @@ discard block |
||
| 448 | 448 | ); |
| 449 | 449 | $this->output->writeln('<info>ok</info>'); |
| 450 | 450 | } catch (Exception $e) { |
| 451 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
| 452 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
| 451 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
| 452 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | |
@@ -467,12 +467,12 @@ discard block |
||
| 467 | 467 | try { |
| 468 | 468 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
| 469 | 469 | if ($current->getUid(true) === $instance->getUid(true)) { |
| 470 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
| 470 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
| 471 | 471 | } else { |
| 472 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
| 472 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
| 473 | 473 | } |
| 474 | 474 | } catch (Exception $e) { |
| 475 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
| 475 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | $rows[] = [ |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | } |
| 501 | 501 | } |
| 502 | 502 | |
| 503 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 503 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | /** |
@@ -513,6 +513,6 @@ discard block |
||
| 513 | 513 | } |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | - throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 516 | + throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE)); |
|
| 517 | 517 | } |
| 518 | 518 | } |
@@ -167,11 +167,11 @@ discard block |
||
| 167 | 167 | $this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true); |
| 168 | 168 | $circle = $this->circleService->getCircle($circleId); |
| 169 | 169 | |
| 170 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
| 170 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
| 171 | 171 | $owner = $circle->getOwner(); |
| 172 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
| 172 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
| 173 | 173 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 174 | - $output->writeln('<info>Config</info>: ' . $type); |
|
| 174 | + $output->writeln('<info>Config</info>: '.$type); |
|
| 175 | 175 | $output->writeln(' '); |
| 176 | 176 | |
| 177 | 177 | $tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -235,8 +235,7 @@ discard block |
||
| 235 | 235 | $member, |
| 236 | 236 | $this->input->getOption('display-name') |
| 237 | 237 | ), |
| 238 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
| 239 | - '(' . strtolower($member->getStatus()) . ')', |
|
| 238 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')', |
|
| 240 | 239 | ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( |
| 241 | 240 | $member->getInvitedBy(), |
| 242 | 241 | $this->input->getOption('display-name') |
@@ -328,7 +327,7 @@ discard block |
||
| 328 | 327 | $circle = $this->remoteService->getCircleFromInstance( |
| 329 | 328 | $member->getSingleId(), $member->getInstance(), $data |
| 330 | 329 | ); |
| 331 | - } catch (CircleNotFoundException|RemoteInstanceException $e) { |
|
| 330 | + } catch (CircleNotFoundException | RemoteInstanceException $e) { |
|
| 332 | 331 | } |
| 333 | 332 | } else { |
| 334 | 333 | $this->federatedUserService->commandLineInitiator( |
@@ -404,14 +403,14 @@ discard block |
||
| 404 | 403 | $member = $data->gObj('member', Member::class); |
| 405 | 404 | |
| 406 | 405 | if ($lineNumber === 1) { |
| 407 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
| 406 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
| 408 | 407 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
| 409 | - $line .= '@' . $member->getInstance(); |
|
| 408 | + $line .= '@'.$member->getInstance(); |
|
| 410 | 409 | } |
| 411 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
| 410 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
| 412 | 411 | |
| 413 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
| 414 | - $line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser( |
|
| 412 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
| 413 | + $line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser( |
|
| 415 | 414 | $member, |
| 416 | 415 | $this->input->getOption('display-name') |
| 417 | 416 | ); |
@@ -419,7 +418,7 @@ discard block |
||
| 419 | 418 | $line .= ' <info>Source</info>: ' |
| 420 | 419 | . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()]; |
| 421 | 420 | } else { |
| 422 | - $line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()]; |
|
| 421 | + $line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()]; |
|
| 423 | 422 | } |
| 424 | 423 | } |
| 425 | 424 | |
@@ -432,21 +431,21 @@ discard block |
||
| 432 | 431 | return $line; |
| 433 | 432 | } |
| 434 | 433 | $owner = $circle->getOwner(); |
| 435 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
| 434 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
| 436 | 435 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 437 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
| 436 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
| 438 | 437 | } |
| 439 | 438 | } else { |
| 440 | 439 | if ($lineNumber === 1 && !is_null($circle)) { |
| 441 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
| 440 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
| 442 | 441 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
| 443 | - $line .= '@' . $circle->getInstance(); |
|
| 442 | + $line .= '@'.$circle->getInstance(); |
|
| 444 | 443 | } |
| 445 | 444 | } |
| 446 | 445 | } |
| 447 | 446 | |
| 448 | 447 | return $line; |
| 449 | - } catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) { |
|
| 448 | + } catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) { |
|
| 450 | 449 | } |
| 451 | 450 | |
| 452 | 451 | return ''; |
@@ -192,10 +192,10 @@ discard block |
||
| 192 | 192 | // return 0; |
| 193 | 193 | // } |
| 194 | 194 | |
| 195 | - $output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>'); |
|
| 196 | - $output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>'); |
|
| 197 | - $output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>'); |
|
| 198 | - $output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>'); |
|
| 195 | + $output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>'); |
|
| 196 | + $output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>'); |
|
| 197 | + $output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>'); |
|
| 198 | + $output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>'); |
|
| 199 | 199 | |
| 200 | 200 | $output->writeln(''); |
| 201 | 201 | $output->writeln('Memberships:'); |
@@ -204,14 +204,14 @@ discard block |
||
| 204 | 204 | if ($count === 0) { |
| 205 | 205 | $output->writeln('(database not updated)'); |
| 206 | 206 | } else { |
| 207 | - $output->writeln('(' . ((string)$count) . ' entries generated/updated in the database)'); |
|
| 207 | + $output->writeln('('.((string)$count).' entries generated/updated in the database)'); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | foreach ($federatedUser->getMemberships() as $membership) { |
| 211 | 211 | $this->memberships[$membership->getCircleId()] = $membership; |
| 212 | 212 | $output->writeln( |
| 213 | - '- <info>' . $membership->getCircleId() . '</info> (' |
|
| 214 | - . Member::$DEF_LEVEL[$membership->getLevel()] . ')' |
|
| 213 | + '- <info>'.$membership->getCircleId().'</info> (' |
|
| 214 | + . Member::$DEF_LEVEL[$membership->getLevel()].')' |
|
| 215 | 215 | ); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -285,9 +285,9 @@ discard block |
||
| 285 | 285 | if ($lineNumber === 2) { |
| 286 | 286 | return ''; |
| 287 | 287 | } |
| 288 | - $line .= '<info>' . $federatedUser->getSingleId() . '</info>'; |
|
| 288 | + $line .= '<info>'.$federatedUser->getSingleId().'</info>'; |
|
| 289 | 289 | if (!$this->configService->isLocalInstance($federatedUser->getInstance())) { |
| 290 | - $line .= '@' . $federatedUser->getInstance(); |
|
| 290 | + $line .= '@'.$federatedUser->getInstance(); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | return $line; |
@@ -299,33 +299,33 @@ discard block |
||
| 299 | 299 | $circle = $member->getCircle(); |
| 300 | 300 | |
| 301 | 301 | if ($lineNumber === 1) { |
| 302 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
| 302 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
| 303 | 303 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
| 304 | - $line .= '@' . $circle->getInstance(); |
|
| 304 | + $line .= '@'.$circle->getInstance(); |
|
| 305 | 305 | } |
| 306 | - $line .= ' (' . ($this->input->getOption('display-name') ? |
|
| 307 | - $circle->getDisplayName() : $circle->getName()) . ')'; |
|
| 308 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
| 309 | - $line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()]; |
|
| 306 | + $line .= ' ('.($this->input->getOption('display-name') ? |
|
| 307 | + $circle->getDisplayName() : $circle->getName()).')'; |
|
| 308 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
| 309 | + $line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()]; |
|
| 310 | 310 | |
| 311 | 311 | $knownMembership = $this->memberships[$member->getCircleId()]; |
| 312 | 312 | if ($member->getLevel() !== $knownMembership->getLevel()) { |
| 313 | - $line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')'; |
|
| 313 | + $line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')'; |
|
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | if ($lineNumber === 2) { |
| 317 | 317 | $owner = $circle->getOwner(); |
| 318 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' '; |
|
| 318 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' '; |
|
| 319 | 319 | if ($owner->hasBasedOn()) { |
| 320 | - $line .= '(' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') '; |
|
| 320 | + $line .= '('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') '; |
|
| 321 | 321 | } |
| 322 | 322 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 323 | - $line .= ($type === '') ? '' : '<info>Config</info>: ' . $type; |
|
| 323 | + $line .= ($type === '') ? '' : '<info>Config</info>: '.$type; |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | return $line; |
| 327 | 327 | } |
| 328 | - } catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) { |
|
| 328 | + } catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) { |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | return ''; |
@@ -380,6 +380,6 @@ discard block |
||
| 380 | 380 | $table->setRows($rows); |
| 381 | 381 | $table->render(); |
| 382 | 382 | |
| 383 | - $output->writeln(((string)$count) . ' memberships updated'); |
|
| 383 | + $output->writeln(((string)$count).' memberships updated'); |
|
| 384 | 384 | } |
| 385 | 385 | } |
@@ -14,10 +14,10 @@ |
||
| 14 | 14 | define('PHPUNIT_RUN', 1); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -require_once __DIR__ . '/../../../lib/base.php'; |
|
| 18 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 17 | +require_once __DIR__.'/../../../lib/base.php'; |
|
| 18 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 19 | 19 | |
| 20 | -require_once __DIR__ . '/../../../tests/autoload.php'; |
|
| 20 | +require_once __DIR__.'/../../../tests/autoload.php'; |
|
| 21 | 21 | |
| 22 | 22 | Server::get(IAppManager::class)->loadApp('circles'); |
| 23 | 23 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | '<error>WARNING! You are about to delete all data related to the Circles App!</error>' |
| 107 | 107 | ); |
| 108 | 108 | $question = new ConfirmationQuestion( |
| 109 | - '<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false, |
|
| 109 | + '<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false, |
|
| 110 | 110 | '/^(y|Y)/i' |
| 111 | 111 | ); |
| 112 | 112 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $output->writeln('<error>WARNING! This operation is not reversible.</error>'); |
| 123 | 123 | |
| 124 | 124 | $question = new Question( |
| 125 | - '<comment>Please confirm this destructive operation by typing \'' . $action |
|
| 125 | + '<comment>Please confirm this destructive operation by typing \''.$action |
|
| 126 | 126 | . '\'</comment>: ', '' |
| 127 | 127 | ); |
| 128 | 128 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $this->coreRequestBuilder->uninstall(); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - $output->writeln('<info>' . $action . ' done</info>'); |
|
| 143 | + $output->writeln('<info>'.$action.' done</info>'); |
|
| 144 | 144 | |
| 145 | 145 | return 0; |
| 146 | 146 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $this->maintenanceService->runMaintenance($i, $input->getOption('force-refresh')); |
| 154 | 154 | } catch (MaintenanceException $e) { |
| 155 | 155 | $this->logger->warning('issue while performing maintenance', ['level' => $i, ['exception' => $e]]); |
| 156 | - $output->writeln('- <error>issue while performing maintenance</error> ' . $e->getMessage() . ' (more details in logs)'); |
|
| 156 | + $output->writeln('- <error>issue while performing maintenance</error> '.$e->getMessage().' (more details in logs)'); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $federatedUser = $this->federatedUserService->getLocalFederatedUser($userId); |
| 174 | 174 | $displayName = $this->maintenanceService->updateDisplayName($federatedUser); |
| 175 | 175 | if ($displayName !== '') { |
| 176 | - $output->writeln('Display name of ' . $federatedUser->getSingleId() . ' updated to ' . $displayName); |
|
| 176 | + $output->writeln('Display name of '.$federatedUser->getSingleId().' updated to '.$displayName); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | return 0; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | try { |
| 189 | 189 | $this->refreshSingleDisplayName($row['uid'], $output); |
| 190 | 190 | } catch (Exception $e) { |
| 191 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $row['uid']); |
|
| 191 | + $output->writeln(get_class($e).' while trying to update display name of '.$row['uid']); |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | try { |
| 202 | 202 | $this->refreshSingleDisplayName($user['name'], $output); |
| 203 | 203 | } catch (Exception $e) { |
| 204 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $user['name']); |
|
| 204 | + $output->writeln(get_class($e).' while trying to update display name of '.$user['name']); |
|
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | } |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | throw new SignatureException('missing elements in \'headers\''); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - $target = strtolower($request->getMethod()) . ' ' . urldecode($request->getRequestUri()); |
|
| 201 | - $estimated = ['(request-target): ' . $target]; |
|
| 200 | + $target = strtolower($request->getMethod()).' '.urldecode($request->getRequestUri()); |
|
| 201 | + $estimated = ['(request-target): '.$target]; |
|
| 202 | 202 | |
| 203 | 203 | foreach ($headers as $key) { |
| 204 | 204 | $value = $request->getHeader($key); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | throw new SignatureException('empty elements in \'headers\''); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - $estimated[] = $key . ': ' . $value; |
|
| 212 | + $estimated[] = $key.': '.$value; |
|
| 213 | 213 | } |
| 214 | 214 | $signedRequest->setClearSignature(implode("\n", $estimated)); |
| 215 | 215 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $request = $signedRequest->getOutgoingRequest(); |
| 282 | 282 | |
| 283 | 283 | $data = new SimpleDataStore(); |
| 284 | - $data->s('(request-target)', NCRequest::method($request->getType()) . ' ' . $request->getPath()) |
|
| 284 | + $data->s('(request-target)', NCRequest::method($request->getType()).' '.$request->getPath()) |
|
| 285 | 285 | ->sInt('content-length', strlen($signedRequest->getBody())) |
| 286 | 286 | ->s('date', gmdate($this->dateHeader)) |
| 287 | 287 | ->s('digest', $signedRequest->getDigest()) |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | foreach ($data->keys() as $element) { |
| 301 | 301 | try { |
| 302 | 302 | $value = $data->gItem($element); |
| 303 | - $signing[] = $element . ': ' . $value; |
|
| 303 | + $signing[] = $element.': '.$value; |
|
| 304 | 304 | if ($element !== '(request-target)') { |
| 305 | 305 | $signedRequest->getOutgoingRequest()->addHeader($element, $value); |
| 306 | 306 | } |
@@ -333,10 +333,10 @@ discard block |
||
| 333 | 333 | $headers = array_diff($signedRequest->getSignatureHeader()->keys(), ['(request-target)']); |
| 334 | 334 | $signatory = $signedRequest->getSignatory(); |
| 335 | 335 | $signatureElements = [ |
| 336 | - 'keyId="' . $signatory->getKeyId() . '"', |
|
| 337 | - 'algorithm="' . $this->getChosenEncryption($signatory) . '"', |
|
| 338 | - 'headers="' . implode(' ', $headers) . '"', |
|
| 339 | - 'signature="' . $signedRequest->getSignedSignature() . '"' |
|
| 336 | + 'keyId="'.$signatory->getKeyId().'"', |
|
| 337 | + 'algorithm="'.$this->getChosenEncryption($signatory).'"', |
|
| 338 | + 'headers="'.implode(' ', $headers).'"', |
|
| 339 | + 'signature="'.$signedRequest->getSignedSignature().'"' |
|
| 340 | 340 | ]; |
| 341 | 341 | |
| 342 | 342 | $signedRequest->getOutgoingRequest()->addHeader('Signature', implode(',', $signatureElements)); |
@@ -267,7 +267,7 @@ |
||
| 267 | 267 | // also the default footer contains a "Do not reply" which needs to be adjusted. |
| 268 | 268 | if ($initiatorEmail !== null) { |
| 269 | 269 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 270 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 270 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 271 | 271 | } else { |
| 272 | 272 | $emailTemplate->addFooter(); |
| 273 | 273 | } |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | ); |
| 101 | 101 | $resources = $resourceService->getAllTeamResources($circle->getSingleId()); |
| 102 | 102 | } catch (\Exception $e) { |
| 103 | - $this->logger->warning('Failed to fetch resources for circle ' . $circle->getSingleId() . ': ' . $e->getMessage()); |
|
| 103 | + $this->logger->warning('Failed to fetch resources for circle '.$circle->getSingleId().': '.$e->getMessage()); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | $teams[] = [ |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ]; |
| 58 | 58 | |
| 59 | 59 | } catch (\Exception $e) { |
| 60 | - $this->logger->warning('Failed to process team resource: ' . $e->getMessage()); |
|
| 60 | + $this->logger->warning('Failed to process team resource: '.$e->getMessage()); |
|
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | return $resources; |
| 66 | 66 | |
| 67 | 67 | } catch (\Exception $e) { |
| 68 | - $this->logger->error('Failed to fetch team resources: ' . $e->getMessage()); |
|
| 68 | + $this->logger->error('Failed to fetch team resources: '.$e->getMessage()); |
|
| 69 | 69 | return []; |
| 70 | 70 | } |
| 71 | 71 | } |