@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | return $mountPoint; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - return '/' . $userId . '/files/' . ltrim($mountPoint, '/'); |
|
| 155 | + return '/'.$userId.'/files/'.ltrim($mountPoint, '/'); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | public function toMount(string $userId, string $protocol = 'https'): array { |
| 292 | 292 | return [ |
| 293 | 293 | 'owner' => $this->getOwner(), |
| 294 | - 'remote' => $protocol . '://' . $this->getInstance(), |
|
| 294 | + 'remote' => $protocol.'://'.$this->getInstance(), |
|
| 295 | 295 | 'token' => $this->getToken(), |
| 296 | 296 | 'share_token' => $this->getToken(), |
| 297 | 297 | 'password' => $this->getPassword(), |
@@ -409,12 +409,12 @@ discard block |
||
| 409 | 409 | throw new UnknownInterfaceException('misconfigured scheme'); |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | - $base = $scheme . '://' . $this->getCloudInstance($interface) . $path; |
|
| 412 | + $base = $scheme.'://'.$this->getCloudInstance($interface).$path; |
|
| 413 | 413 | if ($route === '') { |
| 414 | 414 | return $base; |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | - return $base . $this->configService->linkToRoute($route, $args); |
|
| 417 | + return $base.$this->configService->linkToRoute($route, $args); |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return $this->configService->getLoopbackPath($route, $args); |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | - return rtrim($base, '/') . $this->configService->linkToRoute($route, $args); |
|
| 450 | + return rtrim($base, '/').$this->configService->linkToRoute($route, $args); |
|
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | |
@@ -338,10 +338,10 @@ |
||
| 338 | 338 | protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member { |
| 339 | 339 | try { |
| 340 | 340 | if ($member->getSingleId() !== '') { |
| 341 | - $userId = $member->getSingleId() . '@' . $member->getInstance(); |
|
| 341 | + $userId = $member->getSingleId().'@'.$member->getInstance(); |
|
| 342 | 342 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE); |
| 343 | 343 | } else { |
| 344 | - $userId = $member->getUserId() . '@' . $member->getInstance(); |
|
| 344 | + $userId = $member->getUserId().'@'.$member->getInstance(); |
|
| 345 | 345 | $federatedUser = $this->federatedUserService->getFederatedUser( |
| 346 | 346 | $userId, |
| 347 | 347 | $member->getUserType() |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $done = []; |
| 240 | 240 | foreach ($circles as $circle) { |
| 241 | 241 | $this->outputService->output( |
| 242 | - 'Caching memberships for Members of \'' . $circle->getDisplayName() . '\'', |
|
| 242 | + 'Caching memberships for Members of \''.$circle->getDisplayName().'\'', |
|
| 243 | 243 | true |
| 244 | 244 | ); |
| 245 | 245 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | try { |
| 288 | 288 | $data = new SimpleDataStore($row); |
| 289 | 289 | $this->outputService->output( |
| 290 | - 'Migrating Circle \'' . $data->g('name') . '\' (' . $data->g('unique_id') . ')', |
|
| 290 | + 'Migrating Circle \''.$data->g('name').'\' ('.$data->g('unique_id').')', |
|
| 291 | 291 | true |
| 292 | 292 | ); |
| 293 | 293 | |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | try { |
| 392 | 392 | $data = new SimpleDataStore($row); |
| 393 | 393 | $this->outputService->output( |
| 394 | - 'Migrating Member \'' . $data->g('user_id') . '\' from \'' . $data->g('circle_id') |
|
| 394 | + 'Migrating Member \''.$data->g('user_id').'\' from \''.$data->g('circle_id') |
|
| 395 | 395 | . '\'', |
| 396 | 396 | true |
| 397 | 397 | ); |
@@ -506,8 +506,8 @@ discard block |
||
| 506 | 506 | $federatedUser = |
| 507 | 507 | $this->federatedUserService->getLocalFederatedUser($data->g('share_with')); |
| 508 | 508 | $this->outputService->output( |
| 509 | - 'Migrating child share #' . $data->gInt('id') . ' owner: ' . $data->g('share_with') |
|
| 510 | - . ' -> ' . $federatedUser->getSingleId(), |
|
| 509 | + 'Migrating child share #'.$data->gInt('id').' owner: '.$data->g('share_with') |
|
| 510 | + . ' -> '.$federatedUser->getSingleId(), |
|
| 511 | 511 | true |
| 512 | 512 | ); |
| 513 | 513 | |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | $addressBook = |
| 579 | 579 | $this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry)); |
| 580 | 580 | |
| 581 | - $member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId); |
|
| 581 | + $member->setUserId($userId.'/'.$addressBook->getUri().'/'.$contactId); |
|
| 582 | 582 | } |
| 583 | 583 | } |
| 584 | 584 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | try { |
| 614 | 614 | $data = new SimpleDataStore($row); |
| 615 | 615 | $this->outputService->output( |
| 616 | - 'Migrating ShareToken \'' . $data->g('token') . '\' for \'' . $data->g('user_id') |
|
| 616 | + 'Migrating ShareToken \''.$data->g('token').'\' for \''.$data->g('user_id') |
|
| 617 | 617 | . '\'', |
| 618 | 618 | true |
| 619 | 619 | ); |
@@ -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 | |
@@ -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 | } |
@@ -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; |
@@ -418,15 +418,15 @@ |
||
| 418 | 418 | * @throws FederatedUserNotFoundException |
| 419 | 419 | */ |
| 420 | 420 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 421 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
| 421 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
| 422 | 422 | throw new FederatedUserNotFoundException(); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
| 426 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
| 427 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
| 428 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
| 429 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
| 425 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
| 426 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
| 427 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
| 428 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
| 429 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
| 430 | 430 | |
| 431 | 431 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
| 432 | 432 | |