@@ -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 | } |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | use TArrayTools; |
52 | 52 | |
53 | - const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
54 | - const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
55 | - const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
56 | - const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
57 | - const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
53 | + const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
54 | + const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
55 | + const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
56 | + const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
57 | + const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
58 | 58 | |
59 | 59 | public static $LIST_TYPE = [ |
60 | 60 | self::TYPE_UNKNOWN, |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | ]; |
455 | 455 | |
456 | 456 | if ($this->getAuthSigned() !== '') { |
457 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
457 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | return array_filter(array_merge($data, parent::jsonSerialize())); |
@@ -469,17 +469,17 @@ discard block |
||
469 | 469 | * @throws RemoteNotFoundException |
470 | 470 | */ |
471 | 471 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
472 | - if ($this->getInt($prefix . 'id', $data) === 0) { |
|
472 | + if ($this->getInt($prefix.'id', $data) === 0) { |
|
473 | 473 | throw new RemoteNotFoundException(); |
474 | 474 | } |
475 | 475 | |
476 | - $this->setDbId($this->getInt($prefix . 'id', $data)); |
|
477 | - $this->import($this->getArray($prefix . 'item', $data)); |
|
478 | - $this->setOrigData($this->getArray($prefix . 'item', $data)); |
|
479 | - $this->setType($this->get($prefix . 'type', $data)); |
|
480 | - $this->setInterface($this->getInt($prefix . 'interface', $data)); |
|
481 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
482 | - $this->setId($this->get($prefix . 'href', $data)); |
|
476 | + $this->setDbId($this->getInt($prefix.'id', $data)); |
|
477 | + $this->import($this->getArray($prefix.'item', $data)); |
|
478 | + $this->setOrigData($this->getArray($prefix.'item', $data)); |
|
479 | + $this->setType($this->get($prefix.'type', $data)); |
|
480 | + $this->setInterface($this->getInt($prefix.'interface', $data)); |
|
481 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
482 | + $this->setId($this->get($prefix.'href', $data)); |
|
483 | 483 | |
484 | 484 | return $this; |
485 | 485 | } |
@@ -84,26 +84,26 @@ discard block |
||
84 | 84 | |
85 | 85 | |
86 | 86 | // specific value |
87 | - const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
88 | - const CFG_SINGLE = 1; // Circle with only one single member. |
|
89 | - const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
87 | + const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
88 | + const CFG_SINGLE = 1; // Circle with only one single member. |
|
89 | + const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
90 | 90 | |
91 | 91 | // bitwise |
92 | - const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
93 | - const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
94 | - const CFG_OPEN = 16; // Circle is open, people can join |
|
95 | - const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
96 | - const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
97 | - const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
98 | - const CFG_PROTECTED = 256; // Password protected to join/request |
|
99 | - const CFG_NO_OWNER = 512; // no owner, only members |
|
100 | - const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
101 | - const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
102 | - const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
103 | - const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
104 | - const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
105 | - const CFG_FEDERATED = 32768; // Federated |
|
106 | - const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
92 | + const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
93 | + const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
94 | + const CFG_OPEN = 16; // Circle is open, people can join |
|
95 | + const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
96 | + const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
97 | + const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
98 | + const CFG_PROTECTED = 256; // Password protected to join/request |
|
99 | + const CFG_NO_OWNER = 512; // no owner, only members |
|
100 | + const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
101 | + const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
102 | + const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
103 | + const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
104 | + const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
105 | + const CFG_FEDERATED = 32768; // Federated |
|
106 | + const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
107 | 107 | |
108 | 108 | public static $DEF_CFG_MAX = 131071; |
109 | 109 | |
@@ -702,22 +702,22 @@ discard block |
||
702 | 702 | * @throws CircleNotFoundException |
703 | 703 | */ |
704 | 704 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
705 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
705 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
706 | 706 | throw new CircleNotFoundException(); |
707 | 707 | } |
708 | 708 | |
709 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
710 | - ->setName($this->get($prefix . 'name', $data)) |
|
711 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
712 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
713 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
714 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
715 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
716 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
717 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
718 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
719 | - |
|
720 | - $creation = $this->get($prefix . 'creation', $data); |
|
709 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
710 | + ->setName($this->get($prefix.'name', $data)) |
|
711 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
712 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
713 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
714 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
715 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
716 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
717 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
718 | + ->setDescription($this->get($prefix.'description', $data)); |
|
719 | + |
|
720 | + $creation = $this->get($prefix.'creation', $data); |
|
721 | 721 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
722 | 722 | |
723 | 723 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
@@ -179,11 +179,11 @@ discard block |
||
179 | 179 | $this->federatedUserService->commandLineInitiator($initiator, $circleId, true); |
180 | 180 | $circle = $this->circleService->getCircle($circleId); |
181 | 181 | |
182 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
182 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
183 | 183 | $owner = $circle->getOwner(); |
184 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
184 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
185 | 185 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
186 | - $output->writeln('<info>Config</info>: ' . $type); |
|
186 | + $output->writeln('<info>Config</info>: '.$type); |
|
187 | 187 | $output->writeln(' '); |
188 | 188 | |
189 | 189 | $tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -247,8 +247,7 @@ discard block |
||
247 | 247 | ($this->input->getOption('display-name')) ? |
248 | 248 | $member->getBasedOn()->getDisplayName() : $member->getUserId(), |
249 | 249 | $this->configService->displayInstance($member->getInstance()), |
250 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
251 | - '(' . strtolower($member->getStatus()) . ')' |
|
250 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')' |
|
252 | 251 | ] |
253 | 252 | ); |
254 | 253 | } |
@@ -389,18 +388,18 @@ discard block |
||
389 | 388 | $member = $data->gObj('member', Member::class); |
390 | 389 | |
391 | 390 | if ($lineNumber === 1) { |
392 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
391 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
393 | 392 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
394 | - $line .= '@' . $member->getInstance(); |
|
393 | + $line .= '@'.$member->getInstance(); |
|
395 | 394 | } |
396 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
395 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
397 | 396 | |
398 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
397 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
399 | 398 | $name = ($this->input->getOption('display-name')) ? |
400 | 399 | $member->getBasedOn()->getDisplayName() : $member->getUserId(); |
401 | - $line .= ' <info>Name</info>: ' . $name; |
|
400 | + $line .= ' <info>Name</info>: '.$name; |
|
402 | 401 | $source = ($member->hasBasedOn()) ? $member->getBasedOn()->getSource() : ''; |
403 | - $line .= ' <info>Source</info>: ' . Circle::$DEF_SOURCE[$source]; |
|
402 | + $line .= ' <info>Source</info>: '.Circle::$DEF_SOURCE[$source]; |
|
404 | 403 | } |
405 | 404 | |
406 | 405 | if ($lineNumber === 2) { |
@@ -412,16 +411,16 @@ discard block |
||
412 | 411 | return $line; |
413 | 412 | } |
414 | 413 | $owner = $circle->getOwner(); |
415 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
414 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
416 | 415 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
417 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
416 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
418 | 417 | } |
419 | 418 | |
420 | 419 | } else { |
421 | 420 | if ($lineNumber === 1 && !is_null($circle)) { |
422 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
421 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
423 | 422 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
424 | - $line .= '@' . $circle->getInstance(); |
|
423 | + $line .= '@'.$circle->getInstance(); |
|
425 | 424 | } |
426 | 425 | } |
427 | 426 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * @param int $config |
249 | 249 | */ |
250 | 250 | public function limitToConfigFlag(int $config): void { |
251 | - $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias() . '.config', $config)); |
|
251 | + $this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias().'.config', $config)); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | } |
333 | 333 | |
334 | 334 | if ($circle->getDisplayName() !== '') { |
335 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
335 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
349 | 349 | ->leftJoin( |
350 | 350 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
351 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
351 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
352 | 352 | ); |
353 | 353 | } catch (RequestBuilderException $e) { |
354 | 354 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $expr = $this->expr(); |
402 | 402 | $this->leftJoin( |
403 | 403 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
404 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
404 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
405 | 405 | ); |
406 | 406 | } |
407 | 407 | |
@@ -429,12 +429,12 @@ discard block |
||
429 | 429 | $this->leftJoin( |
430 | 430 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
431 | 431 | $expr->andX( |
432 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
432 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
433 | 433 | $expr->eq( |
434 | - $aliasRemoteMember . '.instance', |
|
434 | + $aliasRemoteMember.'.instance', |
|
435 | 435 | $this->createNamedParameter($remoteInstance->getInstance()) |
436 | 436 | ), |
437 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
437 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
438 | 438 | ) |
439 | 439 | ); |
440 | 440 | } |
@@ -466,21 +466,21 @@ discard block |
||
466 | 466 | $this->leftJoin( |
467 | 467 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
468 | 468 | $expr->andX( |
469 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
470 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
471 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
469 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
470 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
471 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
472 | 472 | ) |
473 | 473 | ); |
474 | 474 | $this->leftJoin( |
475 | 475 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
476 | 476 | $expr->andX( |
477 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
477 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
478 | 478 | $expr->eq( |
479 | - $aliasRemoteCircleOwner . '.instance', |
|
479 | + $aliasRemoteCircleOwner.'.instance', |
|
480 | 480 | $this->createNamedParameter($remoteInstance->getInstance()) |
481 | 481 | ), |
482 | 482 | $expr->eq( |
483 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
483 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
484 | 484 | ) |
485 | 485 | ) |
486 | 486 | ); |
@@ -513,16 +513,16 @@ discard block |
||
513 | 513 | $expr = $this->expr(); |
514 | 514 | $orX = $expr->orX(); |
515 | 515 | $orX->add( |
516 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
516 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
517 | 517 | ); |
518 | 518 | |
519 | 519 | $orExtOrPassive = $expr->orX(); |
520 | 520 | $orExtOrPassive->add( |
521 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
521 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
522 | 522 | ); |
523 | 523 | if (!$sensitive) { |
524 | 524 | $orExtOrPassive->add( |
525 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
525 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
526 | 526 | ); |
527 | 527 | } else { |
528 | 528 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -531,8 +531,8 @@ discard block |
||
531 | 531 | } |
532 | 532 | |
533 | 533 | $orInstance = $expr->orX(); |
534 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
535 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
534 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
535 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
536 | 536 | |
537 | 537 | $andExternal = $expr->andX(); |
538 | 538 | $andExternal->add($orExtOrPassive); |
@@ -541,13 +541,13 @@ discard block |
||
541 | 541 | $orExtOrTrusted = $expr->orX(); |
542 | 542 | $orExtOrTrusted->add($andExternal); |
543 | 543 | $orExtOrTrusted->add( |
544 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
544 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
545 | 545 | ); |
546 | 546 | |
547 | 547 | $andTrusted = $expr->andX(); |
548 | 548 | $andTrusted->add($orExtOrTrusted); |
549 | - $andTrusted->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_FEDERATED)); |
|
550 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
549 | + $andTrusted->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_FEDERATED)); |
|
550 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
551 | 551 | $orX->add($andTrusted); |
552 | 552 | |
553 | 553 | $this->andWhere($orX); |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | $this->leftJoin( |
576 | 576 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
577 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
577 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
578 | 578 | ); |
579 | 579 | |
580 | 580 | $this->filterDirectMembership($aliasMember, $member); |
@@ -595,28 +595,28 @@ discard block |
||
595 | 595 | |
596 | 596 | if ($member->getUserId() !== '') { |
597 | 597 | $andX->add( |
598 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
598 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
599 | 599 | ); |
600 | 600 | } |
601 | 601 | |
602 | 602 | if ($member->getSingleId() !== '') { |
603 | 603 | $andX->add( |
604 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
604 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
605 | 605 | ); |
606 | 606 | } |
607 | 607 | |
608 | 608 | if ($member->getUserType() > 0) { |
609 | 609 | $andX->add( |
610 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
610 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
611 | 611 | ); |
612 | 612 | } |
613 | 613 | |
614 | 614 | $andX->add( |
615 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) |
|
615 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) |
|
616 | 616 | ); |
617 | 617 | |
618 | 618 | if ($member->getLevel() > 0) { |
619 | - $andX->add($expr->gte($aliasMember . '.level', $this->createNamedParameter($member->getLevel()))); |
|
619 | + $andX->add($expr->gte($aliasMember.'.level', $this->createNamedParameter($member->getLevel()))); |
|
620 | 620 | } |
621 | 621 | |
622 | 622 | $this->andWhere($andX); |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | $this->leftJoin( |
651 | 651 | $alias, CoreRequestBuilder::TABLE_CIRCLE, $aliasCircle, |
652 | - $expr->eq($aliasCircle . '.unique_id', $alias . '.' . $field) |
|
652 | + $expr->eq($aliasCircle.'.unique_id', $alias.'.'.$field) |
|
653 | 653 | ); |
654 | 654 | |
655 | 655 | if (!is_null($initiator)) { |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $this->generateCircleSelectAlias($aliasBasedOn) |
685 | 685 | ->leftJoin( |
686 | 686 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
687 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
687 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
688 | 688 | ); |
689 | 689 | |
690 | 690 | if (!is_null($initiator)) { |
@@ -717,9 +717,9 @@ discard block |
||
717 | 717 | ->leftJoin( |
718 | 718 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
719 | 719 | $expr->andX( |
720 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
720 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
721 | 721 | $expr->eq( |
722 | - $aliasMember . '.level', |
|
722 | + $aliasMember.'.level', |
|
723 | 723 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
724 | 724 | ) |
725 | 725 | ) |
@@ -757,10 +757,10 @@ discard block |
||
757 | 757 | ->leftJoin( |
758 | 758 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
759 | 759 | $expr->andX( |
760 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
761 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
760 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
761 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
762 | 762 | $expr->gte( |
763 | - $aliasMember . '.level', |
|
763 | + $aliasMember.'.level', |
|
764 | 764 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
765 | 765 | ) |
766 | 766 | ) |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | |
791 | 791 | $this->leftJoin( |
792 | 792 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
793 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
793 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
794 | 794 | ); |
795 | 795 | |
796 | 796 | // if (!$this->getBool('getData', $options, false)) { |
@@ -804,8 +804,8 @@ discard block |
||
804 | 804 | ->leftJoin( |
805 | 805 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
806 | 806 | $expr->andX( |
807 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
808 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
807 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
808 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
809 | 809 | ) |
810 | 810 | ); |
811 | 811 | |
@@ -822,12 +822,12 @@ discard block |
||
822 | 822 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
823 | 823 | $this->leftJoin( |
824 | 824 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
825 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
825 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
826 | 826 | ); |
827 | 827 | |
828 | 828 | $orX = $expr->orX( |
829 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
830 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
829 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
830 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
831 | 831 | ); |
832 | 832 | |
833 | 833 | $this->andWhere($orX); |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | |
848 | 848 | $expr = $this->expr(); |
849 | 849 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
850 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
850 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
851 | 851 | } |
852 | 852 | |
853 | 853 | |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | $this->leftJoin( |
872 | 872 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
873 | 873 | // $expr->andX( |
874 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field) |
|
874 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field) |
|
875 | 875 | // $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
876 | 876 | // ) |
877 | 877 | ); |
@@ -885,8 +885,8 @@ discard block |
||
885 | 885 | ->leftJoin( |
886 | 886 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
887 | 887 | $expr->andX( |
888 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
889 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
888 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
889 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
890 | 890 | ) |
891 | 891 | ); |
892 | 892 | } |
@@ -934,10 +934,10 @@ discard block |
||
934 | 934 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
935 | 935 | $expr->andX( |
936 | 936 | $expr->eq( |
937 | - $aliasMembership . '.single_id', |
|
937 | + $aliasMembership.'.single_id', |
|
938 | 938 | $this->createNamedParameter($initiator->getSingleId()) |
939 | 939 | ), |
940 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
940 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
941 | 941 | ) |
942 | 942 | ); |
943 | 943 | |
@@ -950,8 +950,8 @@ discard block |
||
950 | 950 | $this->leftJoin( |
951 | 951 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
952 | 952 | $expr->andX( |
953 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
954 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
953 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
954 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
955 | 955 | ) |
956 | 956 | ); |
957 | 957 | |
@@ -959,8 +959,8 @@ discard block |
||
959 | 959 | $this->leftJoin( |
960 | 960 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
961 | 961 | $expr->andX( |
962 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
963 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
962 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
963 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
964 | 964 | ) |
965 | 965 | ); |
966 | 966 | |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); |
980 | 980 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); |
981 | 981 | } catch (RequestBuilderException $e) { |
982 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); |
|
982 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); |
|
983 | 983 | } |
984 | 984 | } |
985 | 985 | |
@@ -1002,30 +1002,30 @@ discard block |
||
1002 | 1002 | $orX = $expr->orX(); |
1003 | 1003 | $orX->add( |
1004 | 1004 | $expr->andX( |
1005 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1005 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
1006 | 1006 | ) |
1007 | 1007 | ); |
1008 | 1008 | |
1009 | 1009 | if ($getPersonalCircle) { |
1010 | 1010 | $orX->add( |
1011 | 1011 | $expr->andX( |
1012 | - $expr->bitwiseAnd($alias . '.config', Circle::CFG_PERSONAL), |
|
1013 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1012 | + $expr->bitwiseAnd($alias.'.config', Circle::CFG_PERSONAL), |
|
1013 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
1014 | 1014 | ) |
1015 | 1015 | ); |
1016 | 1016 | } |
1017 | 1017 | if (!$this->getBool('mustBeMember', $options, true)) { |
1018 | - $orX->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_VISIBLE)); |
|
1018 | + $orX->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_VISIBLE)); |
|
1019 | 1019 | } |
1020 | 1020 | if ($this->getBool('canBeVisitor', $options, false)) { |
1021 | 1021 | // TODO: should find a better way, also filter on remote initiator on non-federated ? |
1022 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); |
|
1022 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); |
|
1023 | 1023 | } |
1024 | 1024 | if ($this->getBool('canBeVisitorOnOpen', $options, false)) { |
1025 | 1025 | $andOpen = $expr->andX(); |
1026 | - $andOpen->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_OPEN)); |
|
1026 | + $andOpen->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_OPEN)); |
|
1027 | 1027 | $andOpen->add( |
1028 | - $this->createFunction('NOT') . $expr->bitwiseAnd($alias . '.config', Circle::CFG_REQUEST) |
|
1028 | + $this->createFunction('NOT').$expr->bitwiseAnd($alias.'.config', Circle::CFG_REQUEST) |
|
1029 | 1029 | ); |
1030 | 1030 | $orX->add($andOpen); |
1031 | 1031 | } |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | $hide = $expr->andX(); |
1070 | 1070 | foreach (Circle::$DEF_CFG as $cfg => $v) { |
1071 | 1071 | if ($flag & $cfg) { |
1072 | - $hide->add($this->createFunction('NOT') . $expr->bitwiseAnd($aliasCircle . '.config', $cfg)); |
|
1072 | + $hide->add($this->createFunction('NOT').$expr->bitwiseAnd($aliasCircle.'.config', $cfg)); |
|
1073 | 1073 | } |
1074 | 1074 | } |
1075 | 1075 | |
@@ -1088,21 +1088,21 @@ discard block |
||
1088 | 1088 | $expr = $this->expr(); |
1089 | 1089 | $andPassive = $expr->andX(); |
1090 | 1090 | $andPassive->add( |
1091 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1091 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
1092 | 1092 | ); |
1093 | 1093 | |
1094 | 1094 | $orMemberOrLevel = $expr->orX(); |
1095 | 1095 | $orMemberOrLevel->add( |
1096 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
1096 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
1097 | 1097 | ); |
1098 | 1098 | // TODO: do we need this ? (display members from the local instance) |
1099 | 1099 | $orMemberOrLevel->add( |
1100 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
1100 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
1101 | 1101 | ); |
1102 | 1102 | |
1103 | 1103 | $orMemberOrLevel->add( |
1104 | 1104 | $expr->eq( |
1105 | - $this->getDefaultSelectAlias() . '.level', |
|
1105 | + $this->getDefaultSelectAlias().'.level', |
|
1106 | 1106 | $this->createNamedParameter(Member::LEVEL_OWNER) |
1107 | 1107 | ) |
1108 | 1108 | ); |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | * @param int $flag |
1119 | 1119 | */ |
1120 | 1120 | public function filterConfig(string $aliasCircle, int $flag): void { |
1121 | - $this->andWhere($this->expr()->bitwiseAnd($aliasCircle . '.config', $flag)); |
|
1121 | + $this->andWhere($this->expr()->bitwiseAnd($aliasCircle.'.config', $flag)); |
|
1122 | 1122 | } |
1123 | 1123 | |
1124 | 1124 | |
@@ -1149,11 +1149,11 @@ discard block |
||
1149 | 1149 | ) |
1150 | 1150 | ->leftJoin( |
1151 | 1151 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
1152 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
1152 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
1153 | 1153 | ) |
1154 | 1154 | ->leftJoin( |
1155 | 1155 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
1156 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
1156 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
1157 | 1157 | ); |
1158 | 1158 | } |
1159 | 1159 | |
@@ -1175,8 +1175,8 @@ discard block |
||
1175 | 1175 | $this->leftJoin( |
1176 | 1176 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
1177 | 1177 | $expr->andX( |
1178 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
1179 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
1178 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
1179 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
1180 | 1180 | ) |
1181 | 1181 | ); |
1182 | 1182 | |
@@ -1226,13 +1226,13 @@ discard block |
||
1226 | 1226 | $this->leftJoin( |
1227 | 1227 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
1228 | 1228 | $expr->andX( |
1229 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
1230 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
1229 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
1230 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
1231 | 1231 | ) |
1232 | 1232 | ); |
1233 | 1233 | |
1234 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
1235 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
1234 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
1235 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
1236 | 1236 | } |
1237 | 1237 | |
1238 | 1238 | |
@@ -1336,10 +1336,10 @@ discard block |
||
1336 | 1336 | */ |
1337 | 1337 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
1338 | 1338 | $search = str_replace('_', '.', $base); |
1339 | - $path = $search . '.' . $extension; |
|
1339 | + $path = $search.'.'.$extension; |
|
1340 | 1340 | if (!$this->validKey($path, self::$SQL_PATH) |
1341 | 1341 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
1342 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
1342 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
1343 | 1343 | } |
1344 | 1344 | |
1345 | 1345 | if (!is_array($options)) { |
@@ -1348,15 +1348,15 @@ discard block |
||
1348 | 1348 | |
1349 | 1349 | $optionPath = ''; |
1350 | 1350 | foreach (explode('.', $path) as $p) { |
1351 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
1351 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
1352 | 1352 | $options = array_merge( |
1353 | 1353 | $options, |
1354 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
1355 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
1354 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
1355 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
1356 | 1356 | ); |
1357 | 1357 | } |
1358 | 1358 | |
1359 | - return $base . '_' . $extension; |
|
1359 | + return $base.'_'.$extension; |
|
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | |
@@ -1376,7 +1376,7 @@ discard block |
||
1376 | 1376 | } else { |
1377 | 1377 | $k = $arr; |
1378 | 1378 | } |
1379 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
1379 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
1380 | 1380 | } |
1381 | 1381 | |
1382 | 1382 | return $path; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | return $value; |
168 | 168 | } |
169 | 169 | |
170 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
170 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
171 | 171 | return $value; |
172 | 172 | } |
173 | 173 | |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | } |
422 | 422 | |
423 | 423 | if (array_key_exists('port', $loopback)) { |
424 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
424 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
425 | 425 | } else { |
426 | 426 | $loopbackCloudId = $loopback['host']; |
427 | 427 | } |
@@ -450,12 +450,12 @@ discard block |
||
450 | 450 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
451 | 451 | } |
452 | 452 | |
453 | - $base = $scheme . '://' . $instance; |
|
453 | + $base = $scheme.'://'.$instance; |
|
454 | 454 | if ($route === '') { |
455 | 455 | return $base; |
456 | 456 | } |
457 | 457 | |
458 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
458 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | throw new Exception('Please specify a --type for the test'); |
174 | 174 | } |
175 | 175 | if ($test !== '' && !in_array($type, self::$checks)) { |
176 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
176 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | $output->writeln(''); |
281 | - $output->writeln('* testing current address: ' . $test); |
|
281 | + $output->writeln('* testing current address: '.$test); |
|
282 | 282 | |
283 | 283 | try { |
284 | 284 | $this->setupLoopback($input, $output, $test); |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | continue; |
315 | 315 | } |
316 | 316 | |
317 | - $loopback = $scheme . '://' . $cloudId; |
|
318 | - $output->write('* testing address: ' . $loopback . ' '); |
|
317 | + $loopback = $scheme.'://'.$cloudId; |
|
318 | + $output->write('* testing address: '.$loopback.' '); |
|
319 | 319 | |
320 | 320 | if ($this->testLoopback($input, $output, $loopback)) { |
321 | 321 | $output->writeln('* <info>Loopback</info> address looks good'); |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | $test = new FederatedEvent(LoopbackTest::class); |
386 | 386 | $this->federatedEventService->newEvent($test); |
387 | 387 | |
388 | - $output->writeln('<info>' . $test->getWrapperToken() . '</info>'); |
|
388 | + $output->writeln('<info>'.$test->getWrapperToken().'</info>'); |
|
389 | 389 | |
390 | - $output->writeln('- Waiting for async process to finish (' . $this->delay . 's)'); |
|
390 | + $output->writeln('- Waiting for async process to finish ('.$this->delay.'s)'); |
|
391 | 391 | sleep($this->delay); |
392 | 392 | |
393 | 393 | $output->write('- Checking status on FederatedEvent '); |
@@ -401,18 +401,18 @@ discard block |
||
401 | 401 | |
402 | 402 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
403 | 403 | if ($checkVerify === LoopbackTest::VERIFY) { |
404 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
404 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
405 | 405 | } else { |
406 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
406 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
407 | 407 | |
408 | 408 | return false; |
409 | 409 | } |
410 | 410 | |
411 | 411 | $checkManage = $wrapper->getResult()->gInt('manage'); |
412 | 412 | if ($checkManage === LoopbackTest::MANAGE) { |
413 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
413 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
414 | 414 | } else { |
415 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
415 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
416 | 416 | |
417 | 417 | return false; |
418 | 418 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | [$scheme, $cloudId] = $this->parseAddress($loopback); |
435 | 435 | |
436 | 436 | $question = new ConfirmationQuestion( |
437 | - '- Do you want to save <info>'. $loopback . '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
437 | + '- Do you want to save <info>'.$loopback.'</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i' |
|
438 | 438 | ); |
439 | 439 | |
440 | 440 | $helper = $this->getHelper('question'); |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_SCHEME, $scheme); |
448 | 448 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
449 | 449 | $output->writeln( |
450 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
450 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
451 | 451 | ); |
452 | 452 | |
453 | 453 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | continue; |
519 | 519 | } |
520 | 520 | |
521 | - $frontal = $scheme . '://' . $cloudId; |
|
521 | + $frontal = $scheme.'://'.$cloudId; |
|
522 | 522 | break; |
523 | 523 | } |
524 | 524 | |
@@ -532,13 +532,13 @@ discard block |
||
532 | 532 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
533 | 533 | ); |
534 | 534 | $output->writeln( |
535 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
535 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
536 | 536 | ); |
537 | 537 | |
538 | 538 | $question = new Question('result: ', ''); |
539 | 539 | $pasteWebfinger = $helper->ask($input, $output, $question); |
540 | 540 | |
541 | - echo '__ ' . $pasteWebfinger; |
|
541 | + echo '__ '.$pasteWebfinger; |
|
542 | 542 | |
543 | 543 | $output->writeln('TESTING !!'); |
544 | 544 | $output->writeln('TESTING !!'); |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | $this->configService->configureLoopbackRequest($request, $route, $args); |
662 | 662 | $request->setFollowLocation(false); |
663 | 663 | |
664 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
664 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
665 | 665 | |
666 | 666 | try { |
667 | 667 | $this->doRequest($request); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $color = 'info'; |
673 | 673 | } |
674 | 674 | |
675 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
675 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
676 | 676 | if ($result->getStatusCode() === 200) { |
677 | 677 | return true; |
678 | 678 | } |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | |
697 | 697 | $output->writeln(''); |
698 | 698 | $output->writeln( |
699 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
699 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
700 | 700 | ); |
701 | 701 | |
702 | 702 | $helper = $this->getHelper('question'); |
@@ -713,8 +713,8 @@ discard block |
||
713 | 713 | |
714 | 714 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
715 | 715 | $output->writeln( |
716 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
717 | - . $address . '\'</info> stored in database' |
|
716 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
717 | + . $address.'\'</info> stored in database' |
|
718 | 718 | ); |
719 | 719 | } |
720 | 720 | |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | } |
736 | 736 | |
737 | 737 | if (!is_null($cloudIdPort)) { |
738 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
738 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
739 | 739 | } |
740 | 740 | |
741 | 741 | return [$scheme, $cloudId]; |
@@ -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 | } |