Completed
Pull Request — master (#577)
by Julius
01:50
created
lib/Db/CirclesRequestBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		}
246 246
 
247 247
 		$expr = $qb->expr();
248
-		$pf = '' . $this->default_select_alias . '.';
248
+		$pf = ''.$this->default_select_alias.'.';
249 249
 
250 250
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
251 251
 		$qb->selectAlias('u.user_id', 'viewer_userid')
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		   ->leftJoin(
260 260
 			   $this->default_select_alias, DeprecatedRequestBuilder::TABLE_MEMBERS, 'u',
261 261
 			   $expr->andX(
262
-				   $expr->eq('u.circle_id', $pf . 'unique_id'),
262
+				   $expr->eq('u.circle_id', $pf.'unique_id'),
263 263
 				   $expr->eq('u.user_id', $qb->createNamedParameter($userId)),
264 264
 				   $expr->eq('u.instance', $qb->createNamedParameter($instanceId)),
265 265
 				   $expr->eq('u.user_type', $qb->createNamedParameter($type))
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		}
282 282
 
283 283
 		$expr = $qb->expr();
284
-		$pf = $this->default_select_alias . '.';
284
+		$pf = $this->default_select_alias.'.';
285 285
 
286 286
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
287 287
 		$qb->selectAlias('o.user_id', 'owner_userid')
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		   ->leftJoin(
295 295
 			   $this->default_select_alias, DeprecatedRequestBuilder::TABLE_MEMBERS, 'o',
296 296
 			   $expr->andX(
297
-				   $expr->eq('o.circle_id', $pf . 'unique_id'),
297
+				   $expr->eq('o.circle_id', $pf.'unique_id'),
298 298
 				   $expr->eq('o.level', $qb->createNamedParameter(Member::LEVEL_OWNER)),
299 299
 				   $expr->eq('o.user_type', $qb->createNamedParameter(Member::TYPE_USER))
300 300
 			   )
Please login to merge, or discard this patch.
lib/Model/AppService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
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()));
Please login to merge, or discard this patch.
lib/Service/CirclesService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -569,24 +569,24 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Command/CirclesRemoteInit.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
lib/Command/CirclesRemote.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -104,19 +104,19 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
lib/Command/CirclesTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Command/Groups.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/Command/CirclesList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.