@@ -164,14 +164,14 @@ discard block |
||
164 | 164 | if ($input->getOption('tree')) { |
165 | 165 | $this->federatedUserService->commandLineInitiator($initiator, $circleId, true); |
166 | 166 | $circle = $this->circleService->getCircle($circleId); |
167 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
167 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
168 | 168 | $owner = $circle->getOwner(); |
169 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
169 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
170 | 170 | $type = |
171 | 171 | implode( |
172 | 172 | ", ", $this->modelManager->getCircleTypes($circle, ModelManager::TYPES_LONG) |
173 | 173 | ); |
174 | - $output->writeln('<info>Config</info>: ' . $type); |
|
174 | + $output->writeln('<info>Config</info>: '.$type); |
|
175 | 175 | $output->writeln(' '); |
176 | 176 | |
177 | 177 | $tree = new NC21TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | if ($input->getOption('json')) { |
196 | - echo json_encode($members, JSON_PRETTY_PRINT) . "\n"; |
|
196 | + echo json_encode($members, JSON_PRETTY_PRINT)."\n"; |
|
197 | 197 | |
198 | 198 | return 0; |
199 | 199 | } |
@@ -344,32 +344,32 @@ discard block |
||
344 | 344 | $member = $data->gObj('member', Member::class); |
345 | 345 | |
346 | 346 | if ($lineNumber === 1) { |
347 | - $line .= '<info>' . $member->getUserId() . '</info>'; |
|
347 | + $line .= '<info>'.$member->getUserId().'</info>'; |
|
348 | 348 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
349 | - $line .= '@' . $member->getInstance(); |
|
349 | + $line .= '@'.$member->getInstance(); |
|
350 | 350 | } |
351 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
351 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
352 | 352 | |
353 | 353 | if (!is_null($circle)) { |
354 | - $line .= ' <info>Name</info>: ' . $circle->getName(); |
|
354 | + $line .= ' <info>Name</info>: '.$circle->getName(); |
|
355 | 355 | } |
356 | 356 | } |
357 | 357 | |
358 | 358 | if ($lineNumber === 2 && !is_null($circle)) { |
359 | 359 | $owner = $circle->getOwner(); |
360 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
360 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
361 | 361 | $type = |
362 | 362 | implode( |
363 | 363 | ", ", $this->modelManager->getCircleTypes($circle, ModelManager::TYPES_LONG) |
364 | 364 | ); |
365 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
365 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | } else { |
369 | 369 | if ($lineNumber === 1 && !is_null($circle)) { |
370 | - $line .= '<info>' . $circle->getId() . '</info>'; |
|
370 | + $line .= '<info>'.$circle->getId().'</info>'; |
|
371 | 371 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
372 | - $line .= '@' . $circle->getInstance(); |
|
372 | + $line .= '@'.$circle->getInstance(); |
|
373 | 373 | } |
374 | 374 | } |
375 | 375 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | |
111 | 111 | |
112 | 112 | /** |
113 | - * @param array $ids |
|
113 | + * @param string[] $ids |
|
114 | 114 | * |
115 | 115 | * @throws InvalidIdException |
116 | 116 | */ |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | |
174 | 174 | |
175 | 175 | /** |
176 | - * @param array $memberships |
|
177 | - * @param array $known |
|
176 | + * @param Membership[] $memberships |
|
177 | + * @param Membership[] $known |
|
178 | 178 | * |
179 | 179 | * @return int |
180 | 180 | */ |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | |
199 | 199 | |
200 | 200 | /** |
201 | - * @param array $memberships |
|
202 | - * @param array $known |
|
201 | + * @param Membership[] $memberships |
|
202 | + * @param Membership[] $known |
|
203 | 203 | * |
204 | 204 | * @return int |
205 | 205 | */ |
@@ -161,19 +161,19 @@ discard block |
||
161 | 161 | |
162 | 162 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
163 | 163 | if ($this->input->getOption('all')) { |
164 | - $this->output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
164 | + $this->output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
165 | 165 | $this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
166 | 166 | $this->output->writeln(''); |
167 | 167 | } |
168 | 168 | |
169 | 169 | if ($this->input->getOption('all')) { |
170 | 170 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
171 | - $this->output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
171 | + $this->output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
172 | 172 | $this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
173 | 173 | $this->output->writeln(''); |
174 | 174 | } |
175 | 175 | |
176 | - $this->output->writeln('- Available services on <info>' . $host . '</info>'); |
|
176 | + $this->output->writeln('- Available services on <info>'.$host.'</info>'); |
|
177 | 177 | foreach ($webfinger->getLinks() as $link) { |
178 | 178 | $app = $link->getProperty('name'); |
179 | 179 | $ver = $link->getProperty('version'); |
@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | $app .= ' '; |
182 | 182 | } |
183 | 183 | if ($ver !== '') { |
184 | - $ver = 'v' . $ver; |
|
184 | + $ver = 'v'.$ver; |
|
185 | 185 | } |
186 | 186 | |
187 | - $this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
187 | + $this->output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
188 | 188 | } |
189 | 189 | $this->output->writeln(''); |
190 | 190 | |
191 | - $this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
191 | + $this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
192 | 192 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
193 | 193 | $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
194 | 194 | $this->output->writeln(''); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $tempUid = $resource->g('uid'); |
198 | 198 | $this->output->writeln( |
199 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
199 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
200 | 200 | ); |
201 | 201 | |
202 | 202 | try { |
@@ -204,15 +204,15 @@ discard block |
||
204 | 204 | $this->output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
205 | 205 | } catch (SignatureException $e) { |
206 | 206 | $this->output->writeln( |
207 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
207 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
208 | 208 | ); |
209 | 209 | |
210 | 210 | return; |
211 | 211 | } |
212 | 212 | |
213 | - $this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
213 | + $this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
214 | 214 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
215 | - $this->output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
215 | + $this->output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
216 | 216 | |
217 | 217 | return; |
218 | 218 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $this->output->writeln(''); |
221 | 221 | |
222 | 222 | $testUrl = $resource->g('test'); |
223 | - $this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
223 | + $this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
224 | 224 | |
225 | 225 | try { |
226 | 226 | $localSignatory = $this->remoteStreamService->getAppSignatory(); |
@@ -242,18 +242,18 @@ discard block |
||
242 | 242 | $this->output->writeln(''); |
243 | 243 | |
244 | 244 | $this->output->writeln(' * Clear Signature: '); |
245 | - $this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
245 | + $this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
246 | 246 | $this->output->writeln(''); |
247 | 247 | |
248 | 248 | $this->output->writeln(' * Signed Signature (base64 encoded): '); |
249 | 249 | $this->output->writeln( |
250 | - '<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>' |
|
250 | + '<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>' |
|
251 | 251 | ); |
252 | 252 | $this->output->writeln(''); |
253 | 253 | |
254 | 254 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
255 | 255 | $code = $result->getStatusCode(); |
256 | - $this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
256 | + $this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
257 | 257 | $this->output->writeln( |
258 | 258 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
259 | 259 | ); |
@@ -274,13 +274,13 @@ discard block |
||
274 | 274 | $stored = new RemoteInstance(); |
275 | 275 | $this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored); |
276 | 276 | $this->output->writeln( |
277 | - '<info>The remote instance ' . $host |
|
277 | + '<info>The remote instance '.$host |
|
278 | 278 | . ' is already known with this current identity</info>' |
279 | 279 | ); |
280 | 280 | |
281 | 281 | if ($remoteSignatory->getType() !== $stored->getType()) { |
282 | 282 | $this->output->writeln( |
283 | - '- updating type from ' . $stored->getType() . ' to ' |
|
283 | + '- updating type from '.$stored->getType().' to ' |
|
284 | 284 | . $remoteSignatory->getType() |
285 | 285 | ); |
286 | 286 | $this->remoteStreamService->update( |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
292 | 292 | $this->output->writeln( |
293 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
293 | + '- updating host from '.$stored->getInstance().' to ' |
|
294 | 294 | . $remoteSignatory->getInstance() |
295 | 295 | ); |
296 | 296 | $this->remoteStreamService->update( |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | } |
300 | 300 | if ($remoteSignatory->getId() !== $stored->getId()) { |
301 | 301 | $this->output->writeln( |
302 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
302 | + '- updating href/Id from '.$stored->getId().' to ' |
|
303 | 303 | . $remoteSignatory->getId() |
304 | 304 | ); |
305 | 305 | $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF); |
@@ -325,10 +325,10 @@ discard block |
||
325 | 325 | $helper = $this->getHelper('question'); |
326 | 326 | |
327 | 327 | $this->output->writeln( |
328 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
328 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
329 | 329 | ); |
330 | 330 | $question = new ConfirmationQuestion( |
331 | - 'Would you like to identify this remote instance as \'' . $remoteSignatory->getType() |
|
331 | + 'Would you like to identify this remote instance as \''.$remoteSignatory->getType() |
|
332 | 332 | . '\' ? (y/N) ', |
333 | 333 | false, |
334 | 334 | '/^(y|Y)/i' |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $helper = $this->getHelper('question'); |
352 | 352 | |
353 | 353 | $this->output->writeln( |
354 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
354 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
355 | 355 | . '</info> is known but <error>its identity has changed.</error>' |
356 | 356 | ); |
357 | 357 | $this->output->writeln( |
@@ -428,13 +428,13 @@ discard block |
||
428 | 428 | if ($this->configService->isLocalInstance($instance)) { |
429 | 429 | return; |
430 | 430 | } |
431 | - $this->output->write('Adding <comment>' . $instance . '</comment>: '); |
|
431 | + $this->output->write('Adding <comment>'.$instance.'</comment>: '); |
|
432 | 432 | try { |
433 | 433 | $this->remoteStreamService->addRemoteInstance($instance, RemoteInstance::TYPE_GLOBAL_SCALE, true); |
434 | 434 | $this->output->writeln('<info>ok</info>'); |
435 | 435 | } catch (Exception $e) { |
436 | - $msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')'; |
|
437 | - $this->output->writeln('<error>' . get_class($e) . $msg . '</error>'); |
|
436 | + $msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')'; |
|
437 | + $this->output->writeln('<error>'.get_class($e).$msg.'</error>'); |
|
438 | 438 | } |
439 | 439 | } |
440 | 440 | |
@@ -452,12 +452,12 @@ discard block |
||
452 | 452 | try { |
453 | 453 | $current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance()); |
454 | 454 | if ($current->getUid(true) === $instance->getUid(true)) { |
455 | - $currentUid = '<info>' . $current->getUid(true) . '</info>'; |
|
455 | + $currentUid = '<info>'.$current->getUid(true).'</info>'; |
|
456 | 456 | } else { |
457 | - $currentUid = '<error>' . $current->getUid(true) . '</error>'; |
|
457 | + $currentUid = '<error>'.$current->getUid(true).'</error>'; |
|
458 | 458 | } |
459 | 459 | } catch (Exception $e) { |
460 | - $currentUid = '<error>' . $e->getMessage() . '</error>'; |
|
460 | + $currentUid = '<error>'.$e->getMessage().'</error>'; |
|
461 | 461 | } |
462 | 462 | |
463 | 463 | $table->appendRow( |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $type = ucfirst(strtolower($this->input->getOption('type'))); |
480 | 480 | |
481 | 481 | if (!in_array($type, RemoteInstance::$LIST_TYPE)) { |
482 | - throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE)); |
|
482 | + throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE)); |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | return $type; |
@@ -175,10 +175,10 @@ discard block |
||
175 | 175 | $type = Member::parseTypeString($input->getOption('type')); |
176 | 176 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, (int)$type); |
177 | 177 | |
178 | - $output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>'); |
|
179 | - $output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>'); |
|
180 | - $output->writeln('Type: <info>' . Member::$DEF_TYPE[$federatedUser->getUserType()] . '</info>'); |
|
181 | - $output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>'); |
|
178 | + $output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>'); |
|
179 | + $output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>'); |
|
180 | + $output->writeln('Type: <info>'.Member::$DEF_TYPE[$federatedUser->getUserType()].'</info>'); |
|
181 | + $output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>'); |
|
182 | 182 | |
183 | 183 | |
184 | 184 | $output->writeln(''); |
@@ -187,14 +187,14 @@ discard block |
||
187 | 187 | if ($count === 0) { |
188 | 188 | $output->writeln('(database not updated)'); |
189 | 189 | } else { |
190 | - $output->writeln('(' . $count . ' entries generated/updated in the database)'); |
|
190 | + $output->writeln('('.$count.' entries generated/updated in the database)'); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | foreach ($federatedUser->getMemberships() as $membership) { |
194 | 194 | $this->memberships[$membership->getCircleId()] = $membership; |
195 | 195 | $output->writeln( |
196 | - '- <info>' . $membership->getCircleId() . '</info> (' |
|
197 | - . Member::$DEF_LEVEL[$membership->getLevel()] . ')' |
|
196 | + '- <info>'.$membership->getCircleId().'</info> (' |
|
197 | + . Member::$DEF_LEVEL[$membership->getLevel()].')' |
|
198 | 198 | ); |
199 | 199 | } |
200 | 200 | |
@@ -262,9 +262,9 @@ discard block |
||
262 | 262 | if ($lineNumber === 2) { |
263 | 263 | return ''; |
264 | 264 | } |
265 | - $line .= '<info>' . $federatedUser->getSingleId() . '</info>'; |
|
265 | + $line .= '<info>'.$federatedUser->getSingleId().'</info>'; |
|
266 | 266 | if (!$this->configService->isLocalInstance($federatedUser->getInstance())) { |
267 | - $line .= '@' . $federatedUser->getInstance(); |
|
267 | + $line .= '@'.$federatedUser->getInstance(); |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | return $line; |
@@ -276,25 +276,25 @@ discard block |
||
276 | 276 | $circle = $member->getCircle(); |
277 | 277 | |
278 | 278 | if ($lineNumber === 1) { |
279 | - $line .= '<info>' . $circle->getId() . '</info>'; |
|
279 | + $line .= '<info>'.$circle->getId().'</info>'; |
|
280 | 280 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
281 | - $line .= '@' . $circle->getInstance(); |
|
281 | + $line .= '@'.$circle->getInstance(); |
|
282 | 282 | } |
283 | - $line .= ' (' . $circle->getName() . ')'; |
|
284 | - $line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()]; |
|
283 | + $line .= ' ('.$circle->getName().')'; |
|
284 | + $line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()]; |
|
285 | 285 | |
286 | 286 | $knownMembership = $this->memberships[$member->getCircleId()]; |
287 | 287 | if ($member->getLevel() !== $knownMembership->getLevel()) { |
288 | - $line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')'; |
|
288 | + $line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')'; |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
292 | 292 | if ($lineNumber === 2) { |
293 | 293 | $owner = $circle->getOwner(); |
294 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' '; |
|
294 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' '; |
|
295 | 295 | $type = |
296 | 296 | implode(", ", $this->modelManager->getCircleTypes($circle, ModelManager::TYPES_LONG)); |
297 | - $line .= ($type === '') ? '' : '<info>Config</info>: ' . $type; |
|
297 | + $line .= ($type === '') ? '' : '<info>Config</info>: '.$type; |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | return $line; |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | |
50 | 50 | use TArrayTools; |
51 | 51 | |
52 | - const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
53 | - const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
54 | - const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
55 | - const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
56 | - const TYPE_GLOBAL_SCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
52 | + const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
53 | + const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
54 | + const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
55 | + const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
56 | + const TYPE_GLOBAL_SCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
57 | 57 | |
58 | 58 | public static $LIST_TYPE = [ |
59 | 59 | self::TYPE_UNKNOWN, |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | ]; |
408 | 408 | |
409 | 409 | if ($this->getAuthSigned() !== '') { |
410 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
410 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | return array_filter(array_merge($data, parent::jsonSerialize())); |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | $initiatorHelper = new MemberHelper($initiator); |
161 | 161 | $initiatorHelper->mustBeModerator(); |
162 | 162 | |
163 | - $federatedId = $member->getUserId() . '@' . $member->getInstance(); |
|
163 | + $federatedId = $member->getUserId().'@'.$member->getInstance(); |
|
164 | 164 | try { |
165 | 165 | $federatedUser = |
166 | 166 | $this->federatedUserService->getFederatedUser($federatedId, $member->getUserType()); |
167 | 167 | } catch (MemberNotFoundException $e) { |
168 | 168 | throw new MemberNotFoundException( |
169 | - ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' %s not found', |
|
170 | - ['member' => $member->getUserId() . '@' . $member->getInstance()] |
|
169 | + ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' %s not found', |
|
170 | + ['member' => $member->getUserId().'@'.$member->getInstance()] |
|
171 | 171 | ); |
172 | 172 | } |
173 | 173 | $member->importFromIFederatedUser($federatedUser); |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | $knownMember = $this->memberRequest->searchMember($member); |
177 | 177 | // TODO: maybe member is requesting access |
178 | 178 | throw new MemberAlreadyExistsException( |
179 | - ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' %s is already a member', |
|
180 | - ['member' => $member->getUserId() . '@' . $member->getInstance()] |
|
179 | + ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' %s is already a member', |
|
180 | + ['member' => $member->getUserId().'@'.$member->getInstance()] |
|
181 | 181 | ); |
182 | 182 | } catch (MemberNotFoundException $e) { |
183 | 183 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->circleService->confirmCircleNotFull($circle); |
195 | 195 | |
196 | 196 | // TODO: check if it is a member or a mail or a circle and fix the returned message |
197 | - $event->setReadingOutcome(ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' %s have been added to Circle', ['userId' => $member->getUserId()]); |
|
197 | + $event->setReadingOutcome(ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' %s have been added to Circle', ['userId' => $member->getUserId()]); |
|
198 | 198 | |
199 | 199 | return; |
200 | 200 | |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | $this->sendMailExistingShares($template, $author, $recipient); |
491 | 491 | $this->sendPasswordExistingShares($author, $recipient, $password); |
492 | 492 | } catch (Exception $e) { |
493 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
493 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
494 | 494 | } |
495 | 495 | } |
496 | 496 | |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
643 | 643 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
644 | 644 | |
645 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
645 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
646 | 646 | |
647 | 647 | $plainBodyPart = $this->l10n->t( |
648 | 648 | "%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n", |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
685 | 685 | if ($authorEmail !== null) { |
686 | 686 | $message->setReplyTo([$authorEmail => $authorName]); |
687 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
687 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
688 | 688 | } else { |
689 | 689 | $emailTemplate->addFooter(); |
690 | 690 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0) |
255 | 255 | && strpos($remote, 'https://') !== 0 |
256 | 256 | ) { |
257 | - $remote = 'https://' . $remote; |
|
257 | + $remote = 'https://'.$remote; |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | return rtrim($remote, '/'); |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | |
525 | 525 | if ($type !== self::GS_MOCKUP) { |
526 | 526 | throw new GSStatusException( |
527 | - 'GS and lookup are not configured : ' . $lookup . ', ' . $enabled |
|
527 | + 'GS and lookup are not configured : '.$lookup.', '.$enabled |
|
528 | 528 | ); |
529 | 529 | } |
530 | 530 | } |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | } |
594 | 594 | |
595 | 595 | if (array_key_exists('port', $local)) { |
596 | - return $local['host'] . ':' . $local['port']; |
|
596 | + return $local['host'].':'.$local['port']; |
|
597 | 597 | } else { |
598 | 598 | return $local['host']; |
599 | 599 | } |
@@ -615,13 +615,13 @@ discard block |
||
615 | 615 | * @return string |
616 | 616 | */ |
617 | 617 | public function getRemotePath(string $route = 'circles.Navigation.navigate', array $args = []): string { |
618 | - $base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME) . '://' . $this->getLocalInstance(); |
|
618 | + $base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME).'://'.$this->getLocalInstance(); |
|
619 | 619 | |
620 | 620 | if ($route === '') { |
621 | 621 | return $base; |
622 | 622 | } |
623 | 623 | |
624 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
624 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | /** |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $ncBase = substr($ncBase, 0, -strlen($forcedPath)); |
725 | 725 | } |
726 | 726 | |
727 | - return rtrim($ncBase, '/') . $link; |
|
727 | + return rtrim($ncBase, '/').$link; |
|
728 | 728 | } |
729 | 729 | |
730 | 730 | } |