@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | try { |
105 | 105 | $level = Member::parseLevelString($levelString); |
106 | 106 | } catch (MemberLevelException $e) { |
107 | - throw new MemberHelperException('method ' . $levelString . ' not found'); |
|
107 | + throw new MemberHelperException('method '.$levelString.' not found'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $this->mustHaveLevelEqualOrAbove($level); |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | try { |
123 | 123 | $level = Member::parseLevelString($levelString); |
124 | 124 | } catch (MemberLevelException $e) { |
125 | - throw new MemberHelperException('method ' . $levelString . ' not found'); |
|
125 | + throw new MemberHelperException('method '.$levelString.' not found'); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | if ($this->member->getLevel() >= $level) { |
129 | - throw new MemberLevelException('Member cannot be ' . $levelString); |
|
129 | + throw new MemberLevelException('Member cannot be '.$levelString); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 |
@@ -108,7 +108,7 @@ |
||
108 | 108 | $level = Member::parseLevelString($input->getArgument('level')); |
109 | 109 | $outcome = $this->memberService->memberLevel($memberId, $level); |
110 | 110 | |
111 | - echo json_encode($outcome, JSON_PRETTY_PRINT) . "\n"; |
|
111 | + echo json_encode($outcome, JSON_PRETTY_PRINT)."\n"; |
|
112 | 112 | |
113 | 113 | return 0; |
114 | 114 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | |
107 | 107 | $outcome = $this->memberService->removeMember($memberId); |
108 | 108 | |
109 | - echo json_encode($outcome, JSON_PRETTY_PRINT) . "\n"; |
|
109 | + echo json_encode($outcome, JSON_PRETTY_PRINT)."\n"; |
|
110 | 110 | |
111 | 111 | return 0; |
112 | 112 | } |
@@ -189,7 +189,7 @@ |
||
189 | 189 | $loop++; |
190 | 190 | if ($loop > 10 || in_array($instance, $knownInstance)) { |
191 | 191 | throw new CircleNotFoundException( |
192 | - 'circle not found after browsing ' . implode(', ', $knownInstance) |
|
192 | + 'circle not found after browsing '.implode(', ', $knownInstance) |
|
193 | 193 | ); |
194 | 194 | } |
195 | 195 | $knownInstance[] = $instance; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | $request = new NC21Request('', $type); |
263 | 263 | if ($this->configService->isLocalInstance($instance)) { |
264 | - $this->configService->configureRequest($request, 'circles.Remote.' . $item, $params); |
|
264 | + $this->configService->configureRequest($request, 'circles.Remote.'.$item, $params); |
|
265 | 265 | } else { |
266 | 266 | $this->configService->configureRequest($request); |
267 | 267 | $link = $this->getRemoteInstanceEntry($instance, $item, $params); |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | public function getCachedRemoteInstance(string $instance): RemoteInstance { |
318 | 318 | $remoteInstance = $this->remoteRequest->getFromInstance($instance); |
319 | 319 | if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) { |
320 | - throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database'); |
|
320 | + throw new UnknownRemoteException($instance.' is set as \'unknown\' in database'); |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | return $remoteInstance; |
@@ -166,7 +166,7 @@ |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | if ($input->getOption('json')) { |
169 | - echo json_encode($circles, JSON_PRETTY_PRINT) . "\n"; |
|
169 | + echo json_encode($circles, JSON_PRETTY_PRINT)."\n"; |
|
170 | 170 | |
171 | 171 | return 0; |
172 | 172 | } |
@@ -157,7 +157,7 @@ |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | - echo json_encode($circle, JSON_PRETTY_PRINT) . "\n"; |
|
160 | + echo json_encode($circle, JSON_PRETTY_PRINT)."\n"; |
|
161 | 161 | |
162 | 162 | return 0; |
163 | 163 | } |
@@ -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; |
@@ -117,7 +117,7 @@ |
||
117 | 117 | $owner = $this->federatedUserService->getLocalFederatedUser($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 | } |