@@ -259,7 +259,7 @@ |
||
259 | 259 | ]; |
260 | 260 | |
261 | 261 | if ($this->getAuthSigned() !== '') { |
262 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
262 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | return array_filter(array_merge($data, parent::jsonSerialize())); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0) |
252 | 252 | && strpos($remote, 'https://') !== 0 |
253 | 253 | ) { |
254 | - $remote = 'https://' . $remote; |
|
254 | + $remote = 'https://'.$remote; |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | return rtrim($remote, '/'); |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | return false; |
510 | 510 | } |
511 | 511 | |
512 | - throw new GSStatusException('GS and lookup are not configured : ' . $lookup . ', ' . $enabled); |
|
512 | + throw new GSStatusException('GS and lookup are not configured : '.$lookup.', '.$enabled); |
|
513 | 513 | } |
514 | 514 | |
515 | 515 | $clef = $this->config->getSystemValue('gss.jwt.key', ''); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | } |
574 | 574 | |
575 | 575 | if (array_key_exists('port', $local)) { |
576 | - return $local['host'] . ':' . $local['port']; |
|
576 | + return $local['host'].':'.$local['port']; |
|
577 | 577 | } else { |
578 | 578 | return $local['host']; |
579 | 579 | } |
@@ -595,13 +595,13 @@ discard block |
||
595 | 595 | * @return string |
596 | 596 | */ |
597 | 597 | public function getRemotePath(string $route = 'circles.Navigation.navigate', array $args = []): string { |
598 | - $base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME) . '://' . $this->getLocalInstance(); |
|
598 | + $base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME).'://'.$this->getLocalInstance(); |
|
599 | 599 | |
600 | 600 | if ($route === '') { |
601 | 601 | return $base; |
602 | 602 | } |
603 | 603 | |
604 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
604 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
605 | 605 | } |
606 | 606 | |
607 | 607 | /** |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | $ncBase = substr($ncBase, 0, -strlen($forcedPath)); |
703 | 703 | } |
704 | 704 | |
705 | - return rtrim($ncBase, '/') . $link; |
|
705 | + return rtrim($ncBase, '/').$link; |
|
706 | 706 | } |
707 | 707 | |
708 | 708 | } |
@@ -569,24 +569,24 @@ |
||
569 | 569 | switch ($type) { |
570 | 570 | case Circle::CIRCLES_PERSONAL: |
571 | 571 | return $urlGen->getAbsoluteURL( |
572 | - $urlGen->imagePath(Application::APP_ID, 'personal' . $ext) |
|
572 | + $urlGen->imagePath(Application::APP_ID, 'personal'.$ext) |
|
573 | 573 | ); |
574 | 574 | case Circle::CIRCLES_CLOSED: |
575 | 575 | return $urlGen->getAbsoluteURL( |
576 | - $urlGen->imagePath(Application::APP_ID, 'closed' . $ext) |
|
576 | + $urlGen->imagePath(Application::APP_ID, 'closed'.$ext) |
|
577 | 577 | ); |
578 | 578 | case Circle::CIRCLES_SECRET: |
579 | 579 | return $urlGen->getAbsoluteURL( |
580 | - $urlGen->imagePath(Application::APP_ID, 'secret' . $ext) |
|
580 | + $urlGen->imagePath(Application::APP_ID, 'secret'.$ext) |
|
581 | 581 | ); |
582 | 582 | case Circle::CIRCLES_PUBLIC: |
583 | 583 | return $urlGen->getAbsoluteURL( |
584 | - $urlGen->imagePath(Application::APP_ID, 'black_circle' . $ext) |
|
584 | + $urlGen->imagePath(Application::APP_ID, 'black_circle'.$ext) |
|
585 | 585 | ); |
586 | 586 | } |
587 | 587 | |
588 | 588 | return $urlGen->getAbsoluteURL( |
589 | - $urlGen->imagePath(Application::APP_ID, 'black_circle' . $ext) |
|
589 | + $urlGen->imagePath(Application::APP_ID, 'black_circle'.$ext) |
|
590 | 590 | ); |
591 | 591 | } |
592 | 592 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $output->writeln('Looks like Federated Circles is already enabled:'); |
107 | 107 | $output->writeln(''); |
108 | 108 | $output->writeln( |
109 | - '<info>' . json_encode($signatory, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
|
109 | + '<info>'.json_encode($signatory, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
|
110 | 110 | . '</info>' |
111 | 111 | ); |
112 | 112 | |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | |
195 | 195 | $currInstance = $this->configService->getLocalInstance(); |
196 | 196 | $output->writeln(''); |
197 | - $output->writeln('The domain name of your instance is: <info>' . $currInstance . '</info>'); |
|
197 | + $output->writeln('The domain name of your instance is: <info>'.$currInstance.'</info>'); |
|
198 | 198 | $helper = $this->getHelper('question'); |
199 | 199 | $question = |
200 | - new Question('<info>Change your domain name:</info> (' . $currInstance . ') ', $currInstance); |
|
200 | + new Question('<info>Change your domain name:</info> ('.$currInstance.') ', $currInstance); |
|
201 | 201 | |
202 | 202 | $newInstance = $helper->ask($input, $output, $question); |
203 | 203 | |
@@ -208,9 +208,9 @@ discard block |
||
208 | 208 | |
209 | 209 | $output->writeln(''); |
210 | 210 | $currScheme = $this->configService->getAppValue(ConfigService::LOCAL_CLOUD_SCHEME); |
211 | - $output->writeln('Current protocol is <info>' . strtoupper($currScheme) . '</info>'); |
|
211 | + $output->writeln('Current protocol is <info>'.strtoupper($currScheme).'</info>'); |
|
212 | 212 | $question = |
213 | - new Question('<info>Change the used protocol:</info> (' . $currScheme . ') ', $currScheme); |
|
213 | + new Question('<info>Change the used protocol:</info> ('.$currScheme.') ', $currScheme); |
|
214 | 214 | $newScheme = strtolower($helper->ask($input, $output, $question)); |
215 | 215 | |
216 | 216 | if ($newScheme !== $currScheme) { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $app = $this->remoteService->getAppSignatory(true); |
232 | 232 | |
233 | 233 | $output->writeln( |
234 | - '<info>' . json_encode($app, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</info>' |
|
234 | + '<info>'.json_encode($app, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).'</info>' |
|
235 | 235 | ); |
236 | 236 | $output->writeln(''); |
237 | 237 | } |
@@ -104,19 +104,19 @@ discard block |
||
104 | 104 | |
105 | 105 | $webfinger = $this->getWebfinger($host, Application::APP_SUBJECT); |
106 | 106 | if ($input->getOption('all')) { |
107 | - $output->writeln('- Webfinger on <info>' . $host . '</info>'); |
|
107 | + $output->writeln('- Webfinger on <info>'.$host.'</info>'); |
|
108 | 108 | $output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
109 | 109 | $output->writeln(''); |
110 | 110 | } |
111 | 111 | |
112 | 112 | if ($input->getOption('all')) { |
113 | 113 | $circleLink = $this->extractLink(Application::APP_REL, $webfinger); |
114 | - $output->writeln('- Information about Circles app on <info>' . $host . '</info>'); |
|
114 | + $output->writeln('- Information about Circles app on <info>'.$host.'</info>'); |
|
115 | 115 | $output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
116 | 116 | $output->writeln(''); |
117 | 117 | } |
118 | 118 | |
119 | - $output->writeln('- Available services on <info>' . $host . '</info>'); |
|
119 | + $output->writeln('- Available services on <info>'.$host.'</info>'); |
|
120 | 120 | foreach ($webfinger->getLinks() as $link) { |
121 | 121 | $app = $link->getProperty('name'); |
122 | 122 | $ver = $link->getProperty('version'); |
@@ -124,14 +124,14 @@ discard block |
||
124 | 124 | $app .= ' '; |
125 | 125 | } |
126 | 126 | if ($ver !== '') { |
127 | - $ver = 'v' . $ver; |
|
127 | + $ver = 'v'.$ver; |
|
128 | 128 | } |
129 | 129 | |
130 | - $output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver); |
|
130 | + $output->writeln(' * '.$link->getRel().' '.$app.$ver); |
|
131 | 131 | } |
132 | 132 | $output->writeln(''); |
133 | 133 | |
134 | - $output->writeln('- Resources related to Circles on <info>' . $host . '</info>'); |
|
134 | + $output->writeln('- Resources related to Circles on <info>'.$host.'</info>'); |
|
135 | 135 | $resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL); |
136 | 136 | $output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
137 | 137 | $output->writeln(''); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $tempUid = $resource->g('uid'); |
141 | 141 | $output->writeln( |
142 | - '- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>' |
|
142 | + '- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>' |
|
143 | 143 | ); |
144 | 144 | |
145 | 145 | try { |
@@ -147,15 +147,15 @@ discard block |
||
147 | 147 | $output->writeln(' * No SignatureException: <info>Identity authed</info>'); |
148 | 148 | } catch (SignatureException $e) { |
149 | 149 | $output->writeln( |
150 | - '<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>' |
|
150 | + '<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>' |
|
151 | 151 | ); |
152 | 152 | |
153 | 153 | return 0; |
154 | 154 | } |
155 | 155 | |
156 | - $output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>'); |
|
156 | + $output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>'); |
|
157 | 157 | if ($remoteSignatory->getUid(true) !== $tempUid) { |
158 | - $output->writeln('<error>looks like ' . $host . ' is faking its identity'); |
|
158 | + $output->writeln('<error>looks like '.$host.' is faking its identity'); |
|
159 | 159 | |
160 | 160 | return 0; |
161 | 161 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $output->writeln(''); |
164 | 164 | |
165 | 165 | $testUrl = $resource->g('test'); |
166 | - $output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>'); |
|
166 | + $output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>'); |
|
167 | 167 | |
168 | 168 | try { |
169 | 169 | $localSignatory = $this->remoteService->getAppSignatory(); |
@@ -185,16 +185,16 @@ discard block |
||
185 | 185 | $output->writeln(''); |
186 | 186 | |
187 | 187 | $output->writeln(' * Clear Signature: '); |
188 | - $output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>'); |
|
188 | + $output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>'); |
|
189 | 189 | $output->writeln(''); |
190 | 190 | |
191 | 191 | $output->writeln(' * Signed Signature (base64 encoded): '); |
192 | - $output->writeln('<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>'); |
|
192 | + $output->writeln('<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>'); |
|
193 | 193 | $output->writeln(''); |
194 | 194 | |
195 | 195 | $result = $signedRequest->getOutgoingRequest()->getResult(); |
196 | 196 | $code = $result->getStatusCode(); |
197 | - $output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code)); |
|
197 | + $output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code)); |
|
198 | 198 | $output->writeln( |
199 | 199 | json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
200 | 200 | ); |
@@ -213,20 +213,20 @@ discard block |
||
213 | 213 | $stored = new AppService(); |
214 | 214 | $this->remoteService->confirmValidRemote($remoteSignatory, $stored); |
215 | 215 | $output->writeln( |
216 | - '<info>The remote instance ' . $host |
|
216 | + '<info>The remote instance '.$host |
|
217 | 217 | . ' is already known with this current identity</info>' |
218 | 218 | ); |
219 | 219 | |
220 | 220 | if ($remoteSignatory->getInstance() !== $stored->getInstance()) { |
221 | 221 | $output->writeln( |
222 | - '- updating host from ' . $stored->getInstance() . ' to ' |
|
222 | + '- updating host from '.$stored->getInstance().' to ' |
|
223 | 223 | . $remoteSignatory->getInstance() |
224 | 224 | ); |
225 | 225 | $this->remoteService->update($remoteSignatory, RemoteService::UPDATE_INSTANCE); |
226 | 226 | } |
227 | 227 | if ($remoteSignatory->getId() !== $stored->getId()) { |
228 | 228 | $output->writeln( |
229 | - '- updating href/Id from ' . $stored->getId() . ' to ' |
|
229 | + '- updating href/Id from '.$stored->getId().' to ' |
|
230 | 230 | . $remoteSignatory->getId() |
231 | 231 | ); |
232 | 232 | $this->remoteService->update($remoteSignatory, RemoteService::UPDATE_HREF); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $helper = $this->getHelper('question'); |
254 | 254 | |
255 | 255 | $output->writeln( |
256 | - 'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.' |
|
256 | + 'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.' |
|
257 | 257 | ); |
258 | 258 | $question = new ConfirmationQuestion( |
259 | 259 | 'Would you like to allow the sharing of your circles with this remote instance ? (y/N) ', |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $helper = $this->getHelper('question'); |
280 | 280 | |
281 | 281 | $output->writeln( |
282 | - 'The remote instance <info>' . $remoteSignatory->getInstance() |
|
282 | + 'The remote instance <info>'.$remoteSignatory->getInstance() |
|
283 | 283 | . '</info> is known but <error>its identity has changed.</error>' |
284 | 284 | ); |
285 | 285 | $output->writeln( |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | $test->setAsync(true); |
142 | 142 | $token = $this->gsUpstreamService->newEvent($test); |
143 | 143 | |
144 | - $output->writeln('- Async request is sent, now waiting ' . $this->delay . ' seconds'); |
|
144 | + $output->writeln('- Async request is sent, now waiting '.$this->delay.' seconds'); |
|
145 | 145 | sleep($this->delay); |
146 | - $output->writeln('- Pause is over, checking results for ' . $token); |
|
146 | + $output->writeln('- Pause is over, checking results for '.$token); |
|
147 | 147 | |
148 | 148 | $wrappers = $this->gsUpstreamService->getEventsByToken($token); |
149 | 149 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | $localLooksGood = false; |
157 | 157 | foreach ($instances as $instance) { |
158 | - $output->write($instance . ' '); |
|
158 | + $output->write($instance.' '); |
|
159 | 159 | if (array_key_exists($instance, $result) |
160 | 160 | && $result[$instance]->getResult() |
161 | 161 | ->gInt('status') === 1) { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $this->configService->configureRequest($request, $route, $args); |
193 | 193 | $request->setFollowLocation(false); |
194 | 194 | |
195 | - $o->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
195 | + $o->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
196 | 196 | $this->doRequest($request); |
197 | 197 | |
198 | 198 | $color = 'error'; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $color = 'info'; |
202 | 202 | } |
203 | 203 | |
204 | - $o->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
204 | + $o->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
205 | 205 | |
206 | 206 | if ($result->getStatusCode() === 200) { |
207 | 207 | return true; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | $output->writeln(''); |
225 | 225 | $output->writeln( |
226 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
226 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
227 | 227 | ); |
228 | 228 | |
229 | 229 | $helper = $this->getHelper('question'); |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | |
241 | 241 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
242 | 242 | $output->writeln( |
243 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
244 | - . $address . '\'</info> stored in database' |
|
243 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
244 | + . $address.'\'</info> stored in database' |
|
245 | 245 | ); |
246 | 246 | } |
247 | 247 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | */ |
94 | 94 | private function listLinkedGroups(InputInterface $input, OutputInterface $output) { |
95 | 95 | if ($input->getOption('list') !== true) { |
96 | - return ; |
|
96 | + return; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | throw new FakeException(); |
@@ -104,7 +104,7 @@ |
||
104 | 104 | $circles = $this->getCircles($owner, $viewer, $remote); |
105 | 105 | |
106 | 106 | if ($json) { |
107 | - echo json_encode($circles, JSON_PRETTY_PRINT) . "\n"; |
|
107 | + echo json_encode($circles, JSON_PRETTY_PRINT)."\n"; |
|
108 | 108 | |
109 | 109 | return 0; |
110 | 110 | } |