Completed
Pull Request — master (#551)
by Maxence
02:16
created
lib/Model/GlobalScale/GSShare.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 			return $mountPoint;
155 155
 		}
156 156
 
157
-		return '/' . $userId . '/files/' . ltrim($mountPoint, '/');
157
+		return '/'.$userId.'/files/'.ltrim($mountPoint, '/');
158 158
 	}
159 159
 
160 160
 	/**
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	public function toMount(string $userId, string $protocol = 'https'): array {
294 294
 		return [
295 295
 			'owner'       => $this->getOwner(),
296
-			'remote'      => $protocol . '://' . $this->getInstance(),
296
+			'remote'      => $protocol.'://'.$this->getInstance(),
297 297
 			'token'       => $this->getToken(),
298 298
 			'share_token' => $this->getToken(),
299 299
 			'password'    => $this->getPassword(),
Please login to merge, or discard this patch.
lib/Db/GSSharesRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,11 +121,11 @@
 block discarded – undo
121 121
 
122 122
 	private function leftJoinMountPoint(IQueryBuilder $qb, string $userId) {
123 123
 		$expr = $qb->expr();
124
-		$pf = '' . $this->default_select_alias . '.';
124
+		$pf = ''.$this->default_select_alias.'.';
125 125
 
126 126
 		$on = $expr->andX();
127 127
 		$on->add($expr->eq('mp.user_id', $qb->createNamedParameter($userId)));
128
-		$on->add($expr->eq('mp.share_id', $pf . 'id'));
128
+		$on->add($expr->eq('mp.share_id', $pf.'id'));
129 129
 
130 130
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
131 131
 		$qb->selectAlias('mp.mountPoint', 'gsshares_mountpoint')
Please login to merge, or discard this patch.
lib/GlobalScale/GSMount/MountProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,13 +148,13 @@
 block discarded – undo
148 148
 		}
149 149
 
150 150
 		$info = pathinfo($share->getMountPoint());
151
-		$filename = $this->get('dirname', $info) . '/' . $this->get('filename', $info);
151
+		$filename = $this->get('dirname', $info).'/'.$this->get('filename', $info);
152 152
 		$extension = $this->get('extension', $info);
153
-		$extension = ($extension === '') ? '' : '.' . $extension;
153
+		$extension = ($extension === '') ? '' : '.'.$extension;
154 154
 
155 155
 		$n = 2;
156 156
 		while (true) {
157
-			$path = $filename . " ($n)" . $extension;
157
+			$path = $filename." ($n)".$extension;
158 158
 			try {
159 159
 				$fs->get($path);
160 160
 			} catch (NotFoundException $e) {
Please login to merge, or discard this patch.
lib/GlobalScale/FileShare.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 			$node = $share->getNode();
106 106
 			$filename = $node->getName();
107 107
 		} catch (NotFoundException $e) {
108
-			$this->miscService->log('issue while FileShare: ' . $e->getMessage());
108
+			$this->miscService->log('issue while FileShare: '.$e->getMessage());
109 109
 
110 110
 			return;
111 111
 		}
112 112
 
113 113
 		$event->getData()
114 114
 			  ->s('gs_federated', $share->getToken())
115
-			  ->s('gs_filename', '/' . $filename);
115
+			  ->s('gs_filename', '/'.$filename);
116 116
 	}
117 117
 
118 118
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 			);
302 302
 		} catch (Exception $e) {
303 303
 			OC::$server->getLogger()
304
-					   ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage());
304
+					   ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage());
305 305
 		}
306 306
 	}
307 307
 
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
 		$message = $this->mailer->createMessage();
320 320
 
321 321
 		$this->miscService->log(
322
-			"Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
323
-			. ' - link: ' . $link, 0
322
+			"Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
323
+			. ' - link: '.$link, 0
324 324
 		);
325 325
 
326 326
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
 		$message = $this->mailer->createMessage();
361 361
 
362
-		$this->miscService->log("Sending password mail to circle '" . $circleName . "': " . $email, 0);
362
+		$this->miscService->log("Sending password mail to circle '".$circleName."': ".$email, 0);
363 363
 
364 364
 		$filename = $share->getNode()
365 365
 						  ->getName();
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
415 415
 		if ($initiatorEmailAddress !== null) {
416 416
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
417
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
417
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
418 418
 		} else {
419 419
 			$emailTemplate->addFooter();
420 420
 		}
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 		$emailTemplate->addHeader();
450 450
 		$emailTemplate->addHeading($subject, false);
451 451
 		$emailTemplate->addBodyText(
452
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
452
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
453 453
 				$this->l10n->t('Click the button below to open it.')
454 454
 			), $text
455 455
 		);
Please login to merge, or discard this patch.
lib/Service/GSDownstreamService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
 			$gs = $this->globalScaleService->getGlobalScaleEvent($event);
156 156
 			$gs->manage($event);
157 157
 		} catch (Exception $e) {
158
-			$this->miscService->log('issue onNewEvent: ' . json_encode($event) . ' - ' . $e->getMessage());
158
+			$this->miscService->log('issue onNewEvent: '.json_encode($event).' - '.$e->getMessage());
159 159
 		}
160 160
 	}
161 161
 
Please login to merge, or discard this patch.
lib/Command/SyncContact.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 		$tCards = $tBooks = 0;
120 120
 		$knownBooks = [];
121 121
 		foreach ($users as $user) {
122
-			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID());
122
+			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID());
123 123
 			$output->writeln(
124
-				'- User <info>' . $user->getUID() . '</info> have ' . sizeof($books) . ' address books:'
124
+				'- User <info>'.$user->getUID().'</info> have '.sizeof($books).' address books:'
125 125
 			);
126 126
 
127 127
 			$tBooks += sizeof($books);
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
 
138 138
 				$shared = '';
139 139
 				if ($owner !== $user->getUID()) {
140
-					$shared = ' (shared by <info>' . $owner . '</info>)';
140
+					$shared = ' (shared by <info>'.$owner.'</info>)';
141 141
 				}
142 142
 
143 143
 				$output->writeln(
144
-					'  <comment>*</comment> book #' . $bookId . $shared . ' contains '
144
+					'  <comment>*</comment> book #'.$bookId.$shared.' contains '
145 145
 					. sizeof($cards)
146 146
 					. ' entries'
147 147
 				);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		}
152 152
 
153 153
 		$output->writeln('');
154
-		$output->writeln('with a total of ' . $tBooks . ' address books and ' . $tCards . ' contact entries');
154
+		$output->writeln('with a total of '.$tBooks.' address books and '.$tCards.' contact entries');
155 155
 	}
156 156
 
157 157
 
Please login to merge, or discard this patch.
lib/GlobalScale/MemberAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			$this->sendMailExistingShares($template, $author, $recipient);
178 178
 			$this->sendPasswordExistingShares($author, $recipient, $password);
179 179
 		} catch (Exception $e) {
180
-			$this->miscService->log('Failed to send mail about existing share ' . $e->getMessage());
180
+			$this->miscService->log('Failed to send mail about existing share '.$e->getMessage());
181 181
 		}
182 182
 	}
183 183
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
328 328
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
329 329
 
330
-		$this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0);
330
+		$this->miscService->log("Sending password mail about existing files to '".$email."'", 0);
331 331
 
332 332
 		$plainBodyPart = $this->l10n->t(
333 333
 			"%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n",
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
370 370
 		if ($authorEmail !== null) {
371 371
 			$message->setReplyTo([$authorEmail => $authorName]);
372
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
372
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
373 373
 		} else {
374 374
 			$emailTemplate->addFooter();
375 375
 		}
Please login to merge, or discard this patch.
lib/GlobalScale/GlobalSync.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 				}
117 117
 
118 118
 				$this->miscService->log(
119
-					'updating member :' . json_encode($member) . ' from ' . json_encode($knownMember), 2
119
+					'updating member :'.json_encode($member).' from '.json_encode($knownMember), 2
120 120
 				);
121 121
 				$this->membersRequest->updateMemberLevel($member);
122 122
 			} catch (MemberDoesNotExistException $e) {
123 123
 				try {
124 124
 					$this->miscService->log(
125
-						'creating member :' . json_encode($member), 2
125
+						'creating member :'.json_encode($member), 2
126 126
 					);
127 127
 					$this->membersRequest->createMember($member);
128 128
 				} catch (MemberAlreadyExistsException $e) {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			try {
141 141
 				$this->getMember($knownItem, $circle->getMembers(), $source);
142 142
 			} catch (MemberDoesNotExistException $e) {
143
-				$this->miscService->log('removing deprecated member :' . json_encode($knownItem), 2);
143
+				$this->miscService->log('removing deprecated member :'.json_encode($knownItem), 2);
144 144
 				$this->membersRequest->removeMember($knownItem);
145 145
 				$this->gsSharesRequest->removeGSSharesFromMember($knownItem);
146 146
 			}
Please login to merge, or discard this patch.
lib/Service/GSUpstreamService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			}
151 151
 		} catch (Exception $e) {
152 152
 			$this->miscService->log(
153
-				get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1
153
+				get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1
154 154
 			);
155 155
 			throw $e;
156 156
 		}
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
 		$request->setDataSerialize($event);
247 247
 
248 248
 		$result = $this->retrieveJson($request);
249
-		$this->miscService->log('result ' . json_encode($result), 0);
249
+		$this->miscService->log('result '.json_encode($result), 0);
250 250
 		if ($this->getInt('status', $result) === 0) {
251 251
 			throw new GlobalScaleEventException($this->get('error', $result));
252 252
 		}
253 253
 
254 254
 		$updatedData = $this->getArray('event', $result);
255
-		$this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0);
255
+		$this->miscService->log('updatedEvent: '.json_encode($updatedData), 0);
256 256
 		if (!empty($updatedData)) {
257 257
 			$updated = new GSEvent();
258 258
 			try {
Please login to merge, or discard this patch.