| @@ -549,29 +549,29 @@ discard block | ||
| 549 | 549 | * @throws MemberNotFoundException | 
| 550 | 550 | */ | 
| 551 | 551 |  	public function importFromDatabase(array $data, string $prefix = ''): INC21QueryRow { | 
| 552 | -		if (!array_key_exists($prefix . 'member_id', $data)) { | |
| 552 | +		if (!array_key_exists($prefix.'member_id', $data)) { | |
| 553 | 553 | throw new MemberNotFoundException(); | 
| 554 | 554 | } | 
| 555 | 555 | |
| 556 | - $this->setId($this->get($prefix . 'member_id', $data)); | |
| 557 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); | |
| 558 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); | |
| 559 | - $this->setUserId($this->get($prefix . 'user_id', $data)); | |
| 560 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); | |
| 561 | - $this->setInstance($this->get($prefix . 'instance', $data)); | |
| 562 | - $this->setLevel($this->getInt($prefix . 'level', $data)); | |
| 563 | - $this->setStatus($this->get($prefix . 'status', $data)); | |
| 564 | - $this->setCachedName($this->get($prefix . 'cached_name', $data)); | |
| 565 | - $this->setNote($this->get($prefix . 'note', $data)); | |
| 566 | - $this->setContactId($this->get($prefix . 'contact_id', $data)); | |
| 567 | - $this->setContactMeta($this->get($prefix . 'contact_meta', $data)); | |
| 568 | - | |
| 569 | - $cachedUpdate = $this->get($prefix . 'cached_update', $data); | |
| 556 | + $this->setId($this->get($prefix.'member_id', $data)); | |
| 557 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); | |
| 558 | + $this->setSingleId($this->get($prefix.'single_id', $data)); | |
| 559 | + $this->setUserId($this->get($prefix.'user_id', $data)); | |
| 560 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); | |
| 561 | + $this->setInstance($this->get($prefix.'instance', $data)); | |
| 562 | + $this->setLevel($this->getInt($prefix.'level', $data)); | |
| 563 | + $this->setStatus($this->get($prefix.'status', $data)); | |
| 564 | + $this->setCachedName($this->get($prefix.'cached_name', $data)); | |
| 565 | + $this->setNote($this->get($prefix.'note', $data)); | |
| 566 | + $this->setContactId($this->get($prefix.'contact_id', $data)); | |
| 567 | + $this->setContactMeta($this->get($prefix.'contact_meta', $data)); | |
| 568 | + | |
| 569 | + $cachedUpdate = $this->get($prefix.'cached_update', $data); | |
| 570 | 570 |  		if ($cachedUpdate !== '') { | 
| 571 | 571 |  			$this->setCachedUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp()); | 
| 572 | 572 | } | 
| 573 | 573 | |
| 574 | - $joined = $this->get($prefix . 'joined', $data); | |
| 574 | + $joined = $this->get($prefix.'joined', $data); | |
| 575 | 575 |  		if ($joined !== '') { | 
| 576 | 576 |  			$this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp()); | 
| 577 | 577 | } | 
| @@ -600,7 +600,7 @@ discard block | ||
| 600 | 600 | |
| 601 | 601 |  		if (!$level) { | 
| 602 | 602 |  			$all = implode(', ', array_values(self::$DEF_LEVEL)); | 
| 603 | -			throw new MemberLevelException('Available levels: ' . $all); | |
| 603 | +			throw new MemberLevelException('Available levels: '.$all); | |
| 604 | 604 | } | 
| 605 | 605 | |
| 606 | 606 | return (int)$level; | 
| @@ -618,7 +618,7 @@ discard block | ||
| 618 | 618 | |
| 619 | 619 |  		if (!$type) { | 
| 620 | 620 |  			$all = implode(', ', array_values(self::$DEF_TYPE)); | 
| 621 | -			throw new UserTypeNotFoundException('Available types: ' . $all); | |
| 621 | +			throw new UserTypeNotFoundException('Available types: '.$all); | |
| 622 | 622 | } | 
| 623 | 623 | |
| 624 | 624 | return (int)$type; | 
| @@ -127,7 +127,7 @@ discard block | ||
| 127 | 127 | |
| 128 | 128 | $outcome = $this->memberService->addMember($circleId, $member); | 
| 129 | 129 | |
| 130 | - echo json_encode($outcome, JSON_PRETTY_PRINT) . "\n"; | |
| 130 | + echo json_encode($outcome, JSON_PRETTY_PRINT)."\n"; | |
| 131 | 131 | |
| 132 | 132 | return 0; | 
| 133 | 133 | } | 
| @@ -178,7 +178,7 @@ discard block | ||
| 178 | 178 | $instance = $host; | 
| 179 | 179 | } | 
| 180 | 180 | |
| 181 | - $result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>'; | |
| 181 | + $result[] = $user['userid']['value'].' <info>@'.$host.'</info>'; | |
| 182 | 182 | } | 
| 183 | 183 | |
| 184 | 184 |  //		if ($userId === '') { | 
| @@ -117,7 +117,7 @@ | ||
| 117 | 117 | $owner = $this->federatedUserService->createLocalFederatedUser($ownerId); | 
| 118 | 118 | $outcome = $this->circleService->create($name, $owner); | 
| 119 | 119 | |
| 120 | - echo json_encode($outcome, JSON_PRETTY_PRINT) . "\n"; | |
| 120 | + echo json_encode($outcome, JSON_PRETTY_PRINT)."\n"; | |
| 121 | 121 | |
| 122 | 122 | return 0; | 
| 123 | 123 | } | 
| @@ -216,7 +216,7 @@ discard block | ||
| 216 | 216 |  	public function createLocalFederatedUser(string $userId): FederatedUser { | 
| 217 | 217 | $user = $this->userManager->get($userId); | 
| 218 | 218 |  		if ($user === null) { | 
| 219 | -			throw new FederatedUserNotFoundException('user ' . $userId . ' not found'); | |
| 219 | +			throw new FederatedUserNotFoundException('user '.$userId.' not found'); | |
| 220 | 220 | } | 
| 221 | 221 | |
| 222 | 222 | $federatedUser = new FederatedUser(); | 
| @@ -395,7 +395,7 @@ discard block | ||
| 395 | 395 | $circle = new Circle(); | 
| 396 | 396 | $id = $this->token(ManagedModel::ID_LENGTH); | 
| 397 | 397 | |
| 398 | -			$circle->setName('single:' . $federatedUser->getUserId() . ':' . $id) | |
| 398 | +			$circle->setName('single:'.$federatedUser->getUserId().':'.$id) | |
| 399 | 399 | ->setId($id) | 
| 400 | 400 | ->setConfig(Circle::CFG_SINGLE); | 
| 401 | 401 | $this->circleRequest->save($circle); | 
| @@ -491,8 +491,8 @@ discard block | ||
| 491 | 491 | |
| 492 | 492 | $last = $this->generateMemberships($federatedUser); | 
| 493 | 493 | |
| 494 | - echo 'known: ' . json_encode($federatedUser->getMemberships()) . "\n"; | |
| 495 | - echo 'last: ' . json_encode($last) . "\n"; | |
| 494 | + echo 'known: '.json_encode($federatedUser->getMemberships())."\n"; | |
| 495 | + echo 'last: '.json_encode($last)."\n"; | |
| 496 | 496 | |
| 497 | 497 | // | 
| 498 | 498 | // $circles = $this->circleRequest->getCircles(null, $viewer); |