@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | return $value; |
236 | 236 | } |
237 | 237 | |
238 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
238 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
239 | 239 | return $value; |
240 | 240 | } |
241 | 241 | |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | */ |
474 | 474 | public function getTrustedDomains(): array { |
475 | 475 | return array_map( |
476 | - function (string $address) { |
|
476 | + function(string $address) { |
|
477 | 477 | return strtolower($address); |
478 | 478 | }, $this->config->getSystemValue('trusted_domains', []) |
479 | 479 | ); |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | } |
510 | 510 | |
511 | 511 | if (array_key_exists('port', $loopback)) { |
512 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
512 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
513 | 513 | } else { |
514 | 514 | $loopbackCloudId = $loopback['host']; |
515 | 515 | } |
@@ -548,13 +548,13 @@ discard block |
||
548 | 548 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
549 | 549 | } |
550 | 550 | |
551 | - $base = $scheme . '://' . $instance . $path; |
|
551 | + $base = $scheme.'://'.$instance.$path; |
|
552 | 552 | |
553 | 553 | if ($route === '') { |
554 | 554 | return $base; |
555 | 555 | } |
556 | 556 | |
557 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
557 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | ): string { |
660 | 660 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
661 | 661 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
662 | - return $name . ' ' . $this->displayInstance( |
|
662 | + return $name.' '.$this->displayInstance( |
|
663 | 663 | $federatedUser->getInstance(), |
664 | 664 | self::DISPLAY_PARENTHESIS |
665 | 665 | ); |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | return $name; |
670 | 670 | } |
671 | 671 | |
672 | - return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
672 | + return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
673 | 673 | } |
674 | 674 | |
675 | 675 | /** |
@@ -685,9 +685,9 @@ discard block |
||
685 | 685 | |
686 | 686 | switch ($type) { |
687 | 687 | case self::DISPLAY_AT: |
688 | - return '@' . $instance; |
|
688 | + return '@'.$instance; |
|
689 | 689 | case self::DISPLAY_PARENTHESIS: |
690 | - return '(' . $instance . ')'; |
|
690 | + return '('.$instance.')'; |
|
691 | 691 | } |
692 | 692 | |
693 | 693 | return $instance; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | require_once __DIR__.'/../../../lib/base.php'; |
6 | 6 | require_once __DIR__.'/../vendor/autoload.php'; |
7 | 7 | |
8 | -\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/unit/', true); |
|
8 | +\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT.'/tests/unit/', true); |
|
9 | 9 | |
10 | 10 | \OC_App::loadApp('circles'); |
11 | 11 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | throw new Exception('Please specify a --type for the test'); |
178 | 178 | } |
179 | 179 | if ($test !== '' && !in_array($type, self::$checks)) { |
180 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
180 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $output->writeln(''); |
238 | - $output->writeln('* testing current address: ' . $test); |
|
238 | + $output->writeln('* testing current address: '.$test); |
|
239 | 239 | |
240 | 240 | try { |
241 | 241 | $this->setupLoopback($input, $output, $test); |
@@ -271,8 +271,8 @@ discard block |
||
271 | 271 | continue; |
272 | 272 | } |
273 | 273 | |
274 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
275 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
274 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
275 | + $output->writeln('* testing address: '.$loopback.' '); |
|
276 | 276 | |
277 | 277 | try { |
278 | 278 | $this->setupLoopback($input, $output, $loopback); |
@@ -345,8 +345,8 @@ discard block |
||
345 | 345 | $test = new FederatedEvent(LoopbackTest::class); |
346 | 346 | $this->federatedEventService->newEvent($test); |
347 | 347 | $output->writeln( |
348 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
349 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
348 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
349 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
350 | 350 | ); |
351 | 351 | |
352 | 352 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -365,18 +365,18 @@ discard block |
||
365 | 365 | |
366 | 366 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
367 | 367 | if ($checkVerify === LoopbackTest::VERIFY) { |
368 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
368 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
369 | 369 | } else { |
370 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
370 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
371 | 371 | |
372 | 372 | return false; |
373 | 373 | } |
374 | 374 | |
375 | 375 | $checkManage = $wrapper->getResult()->gInt('manage'); |
376 | 376 | if ($checkManage === LoopbackTest::MANAGE) { |
377 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
377 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
378 | 378 | } else { |
379 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
379 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
380 | 380 | |
381 | 381 | return false; |
382 | 382 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
416 | 416 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
417 | 417 | $output->writeln( |
418 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
418 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
419 | 419 | ); |
420 | 420 | } |
421 | 421 | |
@@ -467,8 +467,8 @@ discard block |
||
467 | 467 | continue; |
468 | 468 | } |
469 | 469 | |
470 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
471 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
470 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
471 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
472 | 472 | |
473 | 473 | $question = new ConfirmationQuestion( |
474 | 474 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -487,9 +487,9 @@ discard block |
||
487 | 487 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
488 | 488 | ); |
489 | 489 | $output->writeln( |
490 | - ' curl -L "' . $internal |
|
490 | + ' curl -L "'.$internal |
|
491 | 491 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
492 | - . $testToken . '"' |
|
492 | + . $testToken.'"' |
|
493 | 493 | ); |
494 | 494 | |
495 | 495 | $output->writeln('paste the result here: '); |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | |
524 | 524 | if ($pastedHref !== $href) { |
525 | 525 | $output->writeln( |
526 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
526 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
527 | 527 | . $href |
528 | 528 | ); |
529 | 529 | continue; |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | 'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
536 | 536 | ); |
537 | 537 | $output->writeln( |
538 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
538 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
539 | 539 | ); |
540 | 540 | |
541 | 541 | $output->writeln('paste the result here: '); |
@@ -552,9 +552,9 @@ discard block |
||
552 | 552 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
553 | 553 | $output->writeln( |
554 | 554 | '<error>The returned data (' |
555 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
555 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
556 | 556 | . ') are not the one expected: </error>' |
557 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
557 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
558 | 558 | ); |
559 | 559 | continue; |
560 | 560 | } |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
600 | 600 | |
601 | 601 | $output->writeln( |
602 | - '- Address <info>' . $internal . '</info> is now used as <info>internal</info>' |
|
602 | + '- Address <info>'.$internal.'</info> is now used as <info>internal</info>' |
|
603 | 603 | ); |
604 | 604 | } |
605 | 605 | |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | continue; |
653 | 653 | } |
654 | 654 | |
655 | - $frontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
655 | + $frontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
656 | 656 | break; |
657 | 657 | } |
658 | 658 | |
@@ -666,13 +666,13 @@ discard block |
||
666 | 666 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
667 | 667 | ); |
668 | 668 | $output->writeln( |
669 | - ' curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/' |
|
669 | + ' curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/' |
|
670 | 670 | ); |
671 | 671 | |
672 | 672 | $question = new Question('result: ', ''); |
673 | 673 | $pasteWebfinger = $helper->ask($input, $output, $question); |
674 | 674 | |
675 | - echo '__ ' . $pasteWebfinger; |
|
675 | + echo '__ '.$pasteWebfinger; |
|
676 | 676 | |
677 | 677 | $output->writeln('TESTING !!'); |
678 | 678 | $output->writeln('TESTING !!'); |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
800 | 800 | } |
801 | 801 | |
802 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
802 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
803 | 803 | |
804 | 804 | try { |
805 | 805 | $this->doRequest($request); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | $color = 'info'; |
811 | 811 | } |
812 | 812 | |
813 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
813 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
814 | 814 | if ($result->getStatusCode() === 200) { |
815 | 815 | return true; |
816 | 816 | } |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | |
835 | 835 | $output->writeln(''); |
836 | 836 | $output->writeln( |
837 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
837 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
838 | 838 | ); |
839 | 839 | |
840 | 840 | $helper = $this->getHelper('question'); |
@@ -851,8 +851,8 @@ discard block |
||
851 | 851 | |
852 | 852 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
853 | 853 | $output->writeln( |
854 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
855 | - . $address . '\'</info> stored in database' |
|
854 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
855 | + . $address.'\'</info> stored in database' |
|
856 | 856 | ); |
857 | 857 | } |
858 | 858 | |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | $path = rtrim($path, '/'); |
881 | 881 | |
882 | 882 | if (!is_null($cloudIdPort)) { |
883 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
883 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
884 | 884 | } |
885 | 885 | |
886 | 886 | return [$scheme, $cloudId, $path]; |
@@ -281,17 +281,17 @@ |
||
281 | 281 | * @throws ShareTokenNotFoundException |
282 | 282 | */ |
283 | 283 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
284 | - if ($this->get($prefix . 'token', $data) === '') { |
|
284 | + if ($this->get($prefix.'token', $data) === '') { |
|
285 | 285 | throw new ShareTokenNotFoundException(); |
286 | 286 | } |
287 | 287 | |
288 | - $this->setShareId($this->getInt($prefix . 'share_id', $data)); |
|
289 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
290 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
291 | - $this->setMemberId($this->get($prefix . 'member_id', $data)); |
|
292 | - $this->setToken($this->get($prefix . 'token', $data)); |
|
293 | - $this->setPassword($this->get($prefix . 'password', $data)); |
|
294 | - $this->setAccepted($this->getInt($prefix . 'accepted', $data, IShare::STATUS_PENDING)); |
|
288 | + $this->setShareId($this->getInt($prefix.'share_id', $data)); |
|
289 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
290 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
291 | + $this->setMemberId($this->get($prefix.'member_id', $data)); |
|
292 | + $this->setToken($this->get($prefix.'token', $data)); |
|
293 | + $this->setPassword($this->get($prefix.'password', $data)); |
|
294 | + $this->setAccepted($this->getInt($prefix.'accepted', $data, IShare::STATUS_PENDING)); |
|
295 | 295 | |
296 | 296 | return $this; |
297 | 297 | } |
@@ -302,18 +302,18 @@ |
||
302 | 302 | * @throws MembershipNotFoundException |
303 | 303 | */ |
304 | 304 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
305 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
305 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
306 | 306 | throw new MembershipNotFoundException(); |
307 | 307 | } |
308 | 308 | |
309 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
310 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
311 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
312 | - $this->setCircleConfig($this->getInt($prefix . 'circle_config', $data)); |
|
313 | - $this->setInheritanceFirst($this->get($prefix . 'inheritance_first', $data)); |
|
314 | - $this->setInheritanceLast($this->get($prefix . 'inheritance_last', $data)); |
|
315 | - $this->setInheritancePath($this->getArray($prefix . 'inheritance_path', $data)); |
|
316 | - $this->setInheritanceDepth($this->getInt($prefix . 'inheritance_depth', $data)); |
|
309 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
310 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
311 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
312 | + $this->setCircleConfig($this->getInt($prefix.'circle_config', $data)); |
|
313 | + $this->setInheritanceFirst($this->get($prefix.'inheritance_first', $data)); |
|
314 | + $this->setInheritanceLast($this->get($prefix.'inheritance_last', $data)); |
|
315 | + $this->setInheritancePath($this->getArray($prefix.'inheritance_path', $data)); |
|
316 | + $this->setInheritanceDepth($this->getInt($prefix.'inheritance_depth', $data)); |
|
317 | 317 | |
318 | 318 | return $this; |
319 | 319 | } |
@@ -501,29 +501,29 @@ |
||
501 | 501 | * @throws FileCacheNotFoundException |
502 | 502 | */ |
503 | 503 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
504 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
504 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
505 | 505 | throw new FileCacheNotFoundException(); |
506 | 506 | } |
507 | 507 | |
508 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
509 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
510 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
511 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
512 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
513 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
514 | - $this->setName($this->get($prefix . 'name', $data)); |
|
515 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
516 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
517 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
518 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
519 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
520 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
521 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
522 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
523 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
508 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
509 | + $this->setPath($this->get($prefix.'path', $data)); |
|
510 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
511 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
512 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
513 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
514 | + $this->setName($this->get($prefix.'name', $data)); |
|
515 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
516 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
517 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
518 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
519 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
520 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
521 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
522 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
523 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
524 | 524 | |
525 | 525 | // small hack as there is no reason to call a recursive method for a single entry from the table |
526 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
526 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
527 | 527 | |
528 | 528 | return $this; |
529 | 529 | } |
@@ -848,29 +848,29 @@ discard block |
||
848 | 848 | * @throws MemberNotFoundException |
849 | 849 | */ |
850 | 850 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
851 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
851 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
852 | 852 | throw new MemberNotFoundException(); |
853 | 853 | } |
854 | 854 | |
855 | - $this->setId($this->get($prefix . 'member_id', $data)); |
|
856 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
857 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
858 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
859 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
860 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
861 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
862 | - $this->setStatus($this->get($prefix . 'status', $data)); |
|
863 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
864 | - $this->setNotes($this->getArray($prefix . 'note', $data)); |
|
865 | - $this->setContactId($this->get($prefix . 'contact_id', $data)); |
|
866 | - $this->setContactMeta($this->get($prefix . 'contact_meta', $data)); |
|
867 | - |
|
868 | - $cachedUpdate = $this->get($prefix . 'cached_update', $data); |
|
855 | + $this->setId($this->get($prefix.'member_id', $data)); |
|
856 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
857 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
858 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
859 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
860 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
861 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
862 | + $this->setStatus($this->get($prefix.'status', $data)); |
|
863 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
864 | + $this->setNotes($this->getArray($prefix.'note', $data)); |
|
865 | + $this->setContactId($this->get($prefix.'contact_id', $data)); |
|
866 | + $this->setContactMeta($this->get($prefix.'contact_meta', $data)); |
|
867 | + |
|
868 | + $cachedUpdate = $this->get($prefix.'cached_update', $data); |
|
869 | 869 | if ($cachedUpdate !== '') { |
870 | 870 | $this->setDisplayUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp()); |
871 | 871 | } |
872 | 872 | |
873 | - $joined = $this->get($prefix . 'joined', $data); |
|
873 | + $joined = $this->get($prefix.'joined', $data); |
|
874 | 874 | if ($joined !== '') { |
875 | 875 | $this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp()); |
876 | 876 | } |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | public static function parseLevelInt(int $level): int { |
962 | 962 | if (!array_key_exists($level, self::$DEF_LEVEL)) { |
963 | 963 | $all = implode(', ', array_keys(self::$DEF_LEVEL)); |
964 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
964 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
965 | 965 | } |
966 | 966 | |
967 | 967 | return $level; |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | |
981 | 981 | if (!$level) { |
982 | 982 | $all = implode(', ', array_values(self::$DEF_LEVEL)); |
983 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
983 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
984 | 984 | } |
985 | 985 | |
986 | 986 | return (int)$level; |
@@ -1001,7 +1001,7 @@ discard block |
||
1001 | 1001 | $type = array_search($typeString, Member::$TYPE); |
1002 | 1002 | if ($type === false) { |
1003 | 1003 | $all = implode(', ', array_values(self::$TYPE)); |
1004 | - throw new UserTypeNotFoundException('Available types: ' . $all); |
|
1004 | + throw new UserTypeNotFoundException('Available types: '.$all); |
|
1005 | 1005 | } |
1006 | 1006 | |
1007 | 1007 | return (int)$type; |
@@ -677,9 +677,9 @@ discard block |
||
677 | 677 | |
678 | 678 | $display = $circle->getDisplayName(); |
679 | 679 | if ($circle->getSource() === Member::TYPE_CIRCLE) { |
680 | - $display .= ' (Circle owned by ' . $circle->getOwner()->getDisplayName() . ')'; |
|
680 | + $display .= ' (Circle owned by '.$circle->getOwner()->getDisplayName().')'; |
|
681 | 681 | } else { |
682 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
682 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
683 | 683 | } |
684 | 684 | |
685 | 685 | $share->setSharedWithDisplayName($display); |
@@ -785,20 +785,20 @@ discard block |
||
785 | 785 | */ |
786 | 786 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
787 | 787 | $shareTime = new DateTime(); |
788 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
789 | - |
|
790 | - $this->setId($this->get($prefix . 'id', $data)) |
|
791 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
792 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
793 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
794 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
795 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
796 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
797 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
798 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
799 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
800 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
801 | - ->setToken($this->get($prefix . 'token', $data)) |
|
788 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
789 | + |
|
790 | + $this->setId($this->get($prefix.'id', $data)) |
|
791 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
792 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
793 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
794 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
795 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
796 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
797 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
798 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
799 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
800 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
801 | + ->setToken($this->get($prefix.'token', $data)) |
|
802 | 802 | ->setShareTime($shareTime); |
803 | 803 | |
804 | 804 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -807,9 +807,9 @@ discard block |
||
807 | 807 | // $share->setPassword($this->get('password', $data, '')); |
808 | 808 | // } |
809 | 809 | |
810 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
811 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
812 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
810 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
811 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
812 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
813 | 813 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
814 | 814 | ->setStatus(Ishare::STATUS_ACCEPTED); |
815 | 815 |