Passed
Push — master ( 23df99...f86f59 )
by Joas
16:43 queued 15s
created
lib/public/Security/ISecureRandom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 	public const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
48 48
 	public const CHAR_DIGITS = '0123456789';
49 49
 	public const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~';
50
-	public const CHAR_ALPHANUMERIC = self::CHAR_UPPER . self::CHAR_LOWER . self::CHAR_DIGITS;
50
+	public const CHAR_ALPHANUMERIC = self::CHAR_UPPER.self::CHAR_LOWER.self::CHAR_DIGITS;
51 51
 
52 52
 	/**
53 53
 	 * Characters that can be used for <code>generate($length, $characters)</code>, to
Please login to merge, or discard this patch.
lib/private/Setup/PostgreSQL.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 				//use the admin login data for the new database user
66 66
 
67 67
 				//add prefix to the postgresql user name to prevent collisions
68
-				$this->dbUser = 'oc_' . strtolower($username);
68
+				$this->dbUser = 'oc_'.strtolower($username);
69 69
 				//create a new password so we don't need to store the admin config in the config file
70 70
 				$this->dbPassword = \OC::$server->getSecureRandom()->generate(30, ISecureRandom::CHAR_ALPHANUMERIC);
71 71
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	private function createDatabase(Connection $connection) {
110 110
 		if (!$this->databaseExists($connection)) {
111 111
 			//The database does not exists... let's create it
112
-			$query = $connection->prepare("CREATE DATABASE " . addslashes($this->dbName) . " OWNER " . addslashes($this->dbUser));
112
+			$query = $connection->prepare("CREATE DATABASE ".addslashes($this->dbName)." OWNER ".addslashes($this->dbUser));
113 113
 			try {
114 114
 				$query->execute();
115 115
 			} catch (DatabaseException $e) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 				]);
119 119
 			}
120 120
 		} else {
121
-			$query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE " . addslashes($this->dbName) . " FROM PUBLIC");
121
+			$query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE ".addslashes($this->dbName)." FROM PUBLIC");
122 122
 			try {
123 123
 				$query->execute();
124 124
 			} catch (DatabaseException $e) {
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
 			$i = 1;
156 156
 			while ($this->userExists($connection)) {
157 157
 				$i++;
158
-				$this->dbUser = $dbUser . $i;
158
+				$this->dbUser = $dbUser.$i;
159 159
 			}
160 160
 
161 161
 			// create the user
162
-			$query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
162
+			$query = $connection->prepare("CREATE USER ".addslashes($this->dbUser)." CREATEDB PASSWORD '".addslashes($this->dbPassword)."'");
163 163
 			$query->execute();
164 164
 			if ($this->databaseExists($connection)) {
165
-				$query = $connection->prepare('GRANT CONNECT ON DATABASE ' . addslashes($this->dbName) . ' TO '.addslashes($this->dbUser));
165
+				$query = $connection->prepare('GRANT CONNECT ON DATABASE '.addslashes($this->dbName).' TO '.addslashes($this->dbUser));
166 166
 				$query->execute();
167 167
 			}
168 168
 		} catch (DatabaseException $e) {
Please login to merge, or discard this patch.
lib/private/Setup/MySQL.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 				$connection->executeUpdate($query);
126 126
 			}
127 127
 		} catch (\Exception $ex) {
128
-			$this->logger->error('Database user creation failed.',[
128
+			$this->logger->error('Database user creation failed.', [
129 129
 				'exception' => $ex,
130 130
 				'app' => 'mysql.setup',
131 131
 			]);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			//we don't have a dbuser specified in config
146 146
 			if ($this->dbUser !== $oldUser) {
147 147
 				//add prefix to the admin username to prevent collisions
148
-				$adminUser = substr('oc_' . $username, 0, 16);
148
+				$adminUser = substr('oc_'.$username, 0, 16);
149 149
 
150 150
 				$i = 1;
151 151
 				while (true) {
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 						break;
170 170
 					} else {
171 171
 						//repeat with different username
172
-						$length = strlen((string)$i);
173
-						$adminUser = substr('oc_' . $username, 0, 16 - $length) . $i;
172
+						$length = strlen((string) $i);
173
+						$adminUser = substr('oc_'.$username, 0, 16 - $length).$i;
174 174
 						$i++;
175 175
 					}
176 176
 				}
Please login to merge, or discard this patch.
lib/private/AppFramework/Http/Request.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -302,9 +302,9 @@  discard block
 block discarded – undo
302 302
 	 * @return string
303 303
 	 */
304 304
 	public function getHeader(string $name): string {
305
-		$name = strtoupper(str_replace('-', '_',$name));
306
-		if (isset($this->server['HTTP_' . $name])) {
307
-			return $this->server['HTTP_' . $name];
305
+		$name = strtoupper(str_replace('-', '_', $name));
306
+		if (isset($this->server['HTTP_'.$name])) {
307
+			return $this->server['HTTP_'.$name];
308 308
 		}
309 309
 
310 310
 		// There's a few headers that seem to end up in the top-level
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 	 * @return bool
665 665
 	 */
666 666
 	private function isOverwriteCondition(string $type = ''): bool {
667
-		$regex = '/' . $this->config->getSystemValue('overwritecondaddr', '')  . '/';
667
+		$regex = '/'.$this->config->getSystemValue('overwritecondaddr', '').'/';
668 668
 		$remoteAddr = isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : '';
669 669
 		return $regex === '//' || preg_match($regex, $remoteAddr) === 1
670 670
 		|| $type !== 'protocol';
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 	public function getRequestUri(): string {
738 738
 		$uri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : '';
739 739
 		if ($this->config->getSystemValue('overwritewebroot') !== '' && $this->isOverwriteCondition()) {
740
-			$uri = $this->getScriptName() . substr($uri, \strlen($this->server['SCRIPT_NAME']));
740
+			$uri = $this->getScriptName().substr($uri, \strlen($this->server['SCRIPT_NAME']));
741 741
 		}
742 742
 		return $uri;
743 743
 	}
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
 			// FIXME: This code is untestable due to __DIR__, also that hardcoded path is really dangerous
820 820
 			$serverRoot = str_replace('\\', '/', substr(__DIR__, 0, -\strlen('lib/private/appframework/http/')));
821 821
 			$suburi = str_replace('\\', '/', substr(realpath($this->server['SCRIPT_FILENAME']), \strlen($serverRoot)));
822
-			$name = '/' . ltrim($overwriteWebRoot . $suburi, '/');
822
+			$name = '/'.ltrim($overwriteWebRoot.$suburi, '/');
823 823
 		}
824 824
 		return $name;
825 825
 	}
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 			return $host;
895 895
 		}
896 896
 
897
-		$trustedList = (array)$this->config->getSystemValue('trusted_domains', []);
897
+		$trustedList = (array) $this->config->getSystemValue('trusted_domains', []);
898 898
 		if (count($trustedList) > 0) {
899 899
 			return reset($trustedList);
900 900
 		}
Please login to merge, or discard this patch.
lib/private/Cache/File.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 			$rootView = new View();
56 56
 			$user = \OC::$server->getUserSession()->getUser();
57 57
 			Filesystem::initMountPoints($user->getUID());
58
-			if (!$rootView->file_exists('/' . $user->getUID() . '/cache')) {
59
-				$rootView->mkdir('/' . $user->getUID() . '/cache');
58
+			if (!$rootView->file_exists('/'.$user->getUID().'/cache')) {
59
+				$rootView->mkdir('/'.$user->getUID().'/cache');
60 60
 			}
61
-			$this->storage = new View('/' . $user->getUID() . '/cache');
61
+			$this->storage = new View('/'.$user->getUID().'/cache');
62 62
 			return $this->storage;
63 63
 		} else {
64 64
 			\OCP\Util::writeLog('core', 'Can\'t get cache storage, user not logged in', ILogger::ERROR);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		// use part file to prevent hasKey() to find the key
115 115
 		// while it is being written
116
-		$keyPart = $key . '.' . $uniqueId . '.part';
116
+		$keyPart = $key.'.'.$uniqueId.'.part';
117 117
 		if ($storage and $storage->file_put_contents($keyPart, $value)) {
118 118
 			if ($ttl === 0) {
119 119
 				$ttl = 86400; // 60*60*24
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			if (is_resource($dh)) {
163 163
 				while (($file = readdir($dh)) !== false) {
164 164
 					if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) {
165
-						$storage->unlink('/' . $file);
165
+						$storage->unlink('/'.$file);
166 166
 					}
167 167
 				}
168 168
 			}
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
 			while (($file = readdir($dh)) !== false) {
188 188
 				if ($file != '.' and $file != '..') {
189 189
 					try {
190
-						$mtime = $storage->filemtime('/' . $file);
190
+						$mtime = $storage->filemtime('/'.$file);
191 191
 						if ($mtime < $now) {
192
-							$storage->unlink('/' . $file);
192
+							$storage->unlink('/'.$file);
193 193
 						}
194 194
 					} catch (\OCP\Lock\LockedException $e) {
195 195
 						// ignore locked chunks
196
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
196
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
197 197
 					} catch (\OCP\Files\ForbiddenException $e) {
198
-						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']);
198
+						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "'.$file.'"', ['app' => 'core']);
199 199
 					} catch (\OCP\Files\LockNotAcquiredException $e) {
200
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
200
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
201 201
 					}
202 202
 				}
203 203
 			}
Please login to merge, or discard this patch.
apps/settings/lib/Mailer/NewUserMailHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,9 +106,9 @@
 block discarded – undo
106 106
 				21,
107 107
 				ISecureRandom::CHAR_ALPHANUMERIC
108 108
 			);
109
-			$tokenValue = $this->timeFactory->getTime() . ':' . $token;
109
+			$tokenValue = $this->timeFactory->getTime().':'.$token;
110 110
 			$mailAddress = (null !== $user->getEMailAddress()) ? $user->getEMailAddress() : '';
111
-			$encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress . $this->config->getSystemValue('secret'));
111
+			$encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress.$this->config->getSystemValue('secret'));
112 112
 			$this->config->setUserValue($user->getUID(), 'core', 'lostpassword', $encryptedValue);
113 113
 			$link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', ['userId' => $user->getUID(), 'token' => $token]);
114 114
 		} else {
Please login to merge, or discard this patch.
apps/dav/lib/Controller/DirectController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 		}
92 92
 
93 93
 		if ($expirationTime <= 0 || $expirationTime > (60 * 60 * 24)) {
94
-			throw new OCSBadRequestException('Expiration time should be greater than 0 and less than or equal to ' . (60 * 60 * 24));
94
+			throw new OCSBadRequestException('Expiration time should be greater than 0 and less than or equal to '.(60 * 60 * 24));
95 95
 		}
96 96
 
97 97
 		$file = array_shift($files);
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 		}
230 230
 
231 231
 		$data = [
232
-			'attendee_name' => (string)$meetingAttendeeName ?: $defaultVal,
233
-			'invitee_name' => (string)$meetingInviteeName ?: $defaultVal,
234
-			'meeting_title' => (string)$meetingTitle ?: $defaultVal,
235
-			'meeting_description' => (string)$meetingDescription ?: $defaultVal,
236
-			'meeting_url' => (string)$meetingUrl ?: $defaultVal,
232
+			'attendee_name' => (string) $meetingAttendeeName ?: $defaultVal,
233
+			'invitee_name' => (string) $meetingInviteeName ?: $defaultVal,
234
+			'meeting_title' => (string) $meetingTitle ?: $defaultVal,
235
+			'meeting_description' => (string) $meetingDescription ?: $defaultVal,
236
+			'meeting_url' => (string) $meetingUrl ?: $defaultVal,
237 237
 		];
238 238
 
239 239
 		$fromEMail = Util::getDefaultEmailAddress('invitations-noreply');
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 			$message->setReplyTo([$sender => $senderName]);
248 248
 		}
249 249
 
250
-		$template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data);
250
+		$template = $this->mailer->createEMailTemplate('dav.calendarInvite.'.$method, $data);
251 251
 		$template->addHeader();
252 252
 
253 253
 		$summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event');
@@ -294,8 +294,8 @@  discard block
 block discarded – undo
294 294
 
295 295
 		$attachment = $this->mailer->createAttachment(
296 296
 			$iTipMessage->message->serialize(),
297
-			'event.ics',// TODO(leon): Make file name unique, e.g. add event id
298
-			'text/calendar; method=' . $iTipMessage->method
297
+			'event.ics', // TODO(leon): Make file name unique, e.g. add event id
298
+			'text/calendar; method='.$iTipMessage->method
299 299
 		);
300 300
 		$message->attach($attachment);
301 301
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 				$lastOccurrence = $firstOccurrence;
343 343
 			}
344 344
 		} else {
345
-			$it = new EventIterator($vObject, (string)$component->UID);
345
+			$it = new EventIterator($vObject, (string) $component->UID);
346 346
 			$maxDate = new \DateTime(self::MAX_DATE);
347 347
 			if ($it->isInfinite()) {
348 348
 				$lastOccurrence = $maxDate->getTimestamp();
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 			$localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']);
459 459
 			$localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']);
460 460
 
461
-			return $localeStart . ' - ' . $localeEnd;
461
+			return $localeStart.' - '.$localeEnd;
462 462
 		}
463 463
 
464 464
 		/** @var Property\ICalendar\DateTime $dtstart */
@@ -477,26 +477,26 @@  discard block
 block discarded – undo
477 477
 			}
478 478
 		}
479 479
 
480
-		$localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']) . ', ' .
480
+		$localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']).', '.
481 481
 			$l10n->l('datetime', $dtstartDt, ['width' => 'medium|short']);
482 482
 
483 483
 		// always show full date with timezone if timezones are different
484 484
 		if ($startTimezone !== $endTimezone) {
485 485
 			$localeEnd = $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']);
486 486
 
487
-			return $localeStart . ' (' . $startTimezone . ') - ' .
488
-				$localeEnd . ' (' . $endTimezone . ')';
487
+			return $localeStart.' ('.$startTimezone.') - '.
488
+				$localeEnd.' ('.$endTimezone.')';
489 489
 		}
490 490
 
491 491
 		// show only end time if date is the same
492 492
 		if ($this->isDayEqual($dtstartDt, $dtendDt)) {
493 493
 			$localeEnd = $l10n->l('time', $dtendDt, ['width' => 'short']);
494 494
 		} else {
495
-			$localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']) . ', ' .
495
+			$localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']).', '.
496 496
 				$l10n->l('datetime', $dtendDt, ['width' => 'medium|short']);
497 497
 		}
498 498
 
499
-		return  $localeStart . ' - ' . $localeEnd . ' (' . $startTimezone . ')';
499
+		return  $localeStart.' - '.$localeEnd.' ('.$startTimezone.')';
500 500
 	}
501 501
 
502 502
 	/**
@@ -539,16 +539,16 @@  discard block
 block discarded – undo
539 539
 	private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) {
540 540
 		if ($vevent->SUMMARY) {
541 541
 			$template->addBodyListItem($vevent->SUMMARY, $l10n->t('Title:'),
542
-				$this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT);
542
+				$this->getAbsoluteImagePath('caldav/title.png'), '', '', self::IMIP_INDENT);
543 543
 		}
544 544
 		$meetingWhen = $this->generateWhenString($l10n, $vevent);
545 545
 		if ($meetingWhen) {
546 546
 			$template->addBodyListItem($meetingWhen, $l10n->t('Time:'),
547
-				$this->getAbsoluteImagePath('caldav/time.png'),'','',self::IMIP_INDENT);
547
+				$this->getAbsoluteImagePath('caldav/time.png'), '', '', self::IMIP_INDENT);
548 548
 		}
549 549
 		if ($vevent->LOCATION) {
550 550
 			$template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'),
551
-				$this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT);
551
+				$this->getAbsoluteImagePath('caldav/location.png'), '', '', self::IMIP_INDENT);
552 552
 		}
553 553
 		if ($vevent->URL) {
554 554
 			$url = $vevent->URL->getValue();
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 					htmlspecialchars($url)),
558 558
 				$l10n->t('Link:'),
559 559
 				$this->getAbsoluteImagePath('caldav/link.png'),
560
-				$url,'',self::IMIP_INDENT);
560
+				$url, '', self::IMIP_INDENT);
561 561
 		}
562 562
 
563 563
 		$this->addAttendees($template, $l10n, $vevent);
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		/* Put description last, like an email body, since it can be arbitrarily long */
566 566
 		if ($vevent->DESCRIPTION) {
567 567
 			$template->addBodyListItem($vevent->DESCRIPTION->getValue(), $l10n->t('Description:'),
568
-				$this->getAbsoluteImagePath('caldav/description.png'),'','',self::IMIP_INDENT);
568
+				$this->getAbsoluteImagePath('caldav/description.png'), '', '', self::IMIP_INDENT);
569 569
 		}
570 570
 	}
571 571
 
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			/** @var Property\ICalendar\CalAddress $organizer */
596 596
 			$organizer = $vevent->ORGANIZER;
597 597
 			$organizerURI = $organizer->getNormalizedValue();
598
-			[$scheme,$organizerEmail] = explode(':',$organizerURI,2); # strip off scheme mailto:
598
+			[$scheme, $organizerEmail] = explode(':', $organizerURI, 2); # strip off scheme mailto:
599 599
 			/** @var string|null $organizerName */
600 600
 			$organizerName = isset($organizer['CN']) ? $organizer['CN'] : null;
601 601
 			$organizerHTML = sprintf('<a href="%s">%s</a>',
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 			}
613 613
 			$template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'),
614 614
 				$this->getAbsoluteImagePath('caldav/organizer.png'),
615
-				$organizerText,'',self::IMIP_INDENT);
615
+				$organizerText, '', self::IMIP_INDENT);
616 616
 		}
617 617
 
618 618
 		$attendees = $vevent->select('ATTENDEE');
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 		$attendeesText = [];
625 625
 		foreach ($attendees as $attendee) {
626 626
 			$attendeeURI = $attendee->getNormalizedValue();
627
-			[$scheme,$attendeeEmail] = explode(':',$attendeeURI,2); # strip off scheme mailto:
627
+			[$scheme, $attendeeEmail] = explode(':', $attendeeURI, 2); # strip off scheme mailto:
628 628
 			$attendeeName = isset($attendee['CN']) ? $attendee['CN'] : null;
629 629
 			$attendeeHTML = sprintf('<a href="%s">%s</a>',
630 630
 				htmlspecialchars($attendeeURI),
@@ -639,9 +639,9 @@  discard block
 block discarded – undo
639 639
 			array_push($attendeesText, $attendeeText);
640 640
 		}
641 641
 
642
-		$template->addBodyListItem(implode('<br/>',$attendeesHTML), $l10n->t('Attendees:'),
642
+		$template->addBodyListItem(implode('<br/>', $attendeesHTML), $l10n->t('Attendees:'),
643 643
 			$this->getAbsoluteImagePath('caldav/attendees.png'),
644
-			implode("\n",$attendeesText),'',self::IMIP_INDENT);
644
+			implode("\n", $attendeesText), '', self::IMIP_INDENT);
645 645
 	}
646 646
 
647 647
 	/**
Please login to merge, or discard this patch.
apps/sharebymail/lib/ShareByMailProvider.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 		$text = $this->l->t('%1$s shared »%2$s« with you.', [$initiatorDisplayName, $filename]);
397 397
 
398 398
 		$emailTemplate->addBodyText(
399
-			htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')),
399
+			htmlspecialchars($text.' '.$this->l->t('Click the button below to open it.')),
400 400
 			$text
401 401
 		);
402 402
 		$emailTemplate->addBodyButton(
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 		$initiatorEmail = $initiatorUser->getEMailAddress();
426 426
 		if ($this->settingsManager->replyToInitiator() && $initiatorEmail !== null) {
427 427
 			$message->setReplyTo([$initiatorEmail => $initiatorDisplayName]);
428
-			$emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : ''));
428
+			$emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : ''));
429 429
 		} else {
430 430
 			$emailTemplate->addFooter();
431 431
 		}
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
490 490
 		if ($this->settingsManager->replyToInitiator() && $initiatorEmailAddress !== null) {
491 491
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
492
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
492
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
493 493
 		} else {
494 494
 			$emailTemplate->addFooter();
495 495
 		}
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
550 550
 		if ($this->settingsManager->replyToInitiator() && $initiatorEmailAddress !== null) {
551 551
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
552
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
552
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
553 553
 		} else {
554 554
 			$emailTemplate->addFooter();
555 555
 		}
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
 			->setValue('password', $qb->createNamedParameter($password))
687 687
 			->setValue('password_by_talk', $qb->createNamedParameter($sendPasswordByTalk, IQueryBuilder::PARAM_BOOL))
688 688
 			->setValue('stime', $qb->createNamedParameter(time()))
689
-			->setValue('hide_download', $qb->createNamedParameter((int)$hideDownload, IQueryBuilder::PARAM_INT))
689
+			->setValue('hide_download', $qb->createNamedParameter((int) $hideDownload, IQueryBuilder::PARAM_INT))
690 690
 			->setValue('label', $qb->createNamedParameter($label));
691 691
 
692 692
 		if ($expirationTime !== null) {
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 			->set('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL))
735 735
 			->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
736 736
 			->set('note', $qb->createNamedParameter($share->getNote()))
737
-			->set('hide_download', $qb->createNamedParameter((int)$share->getHideDownload(), IQueryBuilder::PARAM_INT))
737
+			->set('hide_download', $qb->createNamedParameter((int) $share->getHideDownload(), IQueryBuilder::PARAM_INT))
738 738
 			->executeStatement();
739 739
 
740 740
 		if ($originalShare->getNote() !== $share->getNote() && $share->getNote() !== '') {
@@ -980,22 +980,22 @@  discard block
 block discarded – undo
980 980
 	 */
981 981
 	protected function createShareObject($data) {
982 982
 		$share = new Share($this->rootFolder, $this->userManager);
983
-		$share->setId((int)$data['id'])
984
-			->setShareType((int)$data['share_type'])
985
-			->setPermissions((int)$data['permissions'])
983
+		$share->setId((int) $data['id'])
984
+			->setShareType((int) $data['share_type'])
985
+			->setPermissions((int) $data['permissions'])
986 986
 			->setTarget($data['file_target'])
987
-			->setMailSend((bool)$data['mail_send'])
987
+			->setMailSend((bool) $data['mail_send'])
988 988
 			->setNote($data['note'])
989 989
 			->setToken($data['token']);
990 990
 
991 991
 		$shareTime = new \DateTime();
992
-		$shareTime->setTimestamp((int)$data['stime']);
992
+		$shareTime->setTimestamp((int) $data['stime']);
993 993
 		$share->setShareTime($shareTime);
994 994
 		$share->setSharedWith($data['share_with']);
995 995
 		$share->setPassword($data['password']);
996 996
 		$share->setLabel($data['label']);
997
-		$share->setSendPasswordByTalk((bool)$data['password_by_talk']);
998
-		$share->setHideDownload((bool)$data['hide_download']);
997
+		$share->setSendPasswordByTalk((bool) $data['password_by_talk']);
998
+		$share->setHideDownload((bool) $data['hide_download']);
999 999
 
1000 1000
 		if ($data['uid_initiator'] !== null) {
1001 1001
 			$share->setShareOwner($data['uid_owner']);
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
 		} else {
1004 1004
 			//OLD SHARE
1005 1005
 			$share->setSharedBy($data['uid_owner']);
1006
-			$path = $this->getNode($share->getSharedBy(), (int)$data['file_source']);
1006
+			$path = $this->getNode($share->getSharedBy(), (int) $data['file_source']);
1007 1007
 
1008 1008
 			$owner = $path->getOwner();
1009 1009
 			$share->setShareOwner($owner->getUID());
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
 			}
1017 1017
 		}
1018 1018
 
1019
-		$share->setNodeId((int)$data['file_source']);
1019
+		$share->setNodeId((int) $data['file_source']);
1020 1020
 		$share->setNodeType($data['item_type']);
1021 1021
 
1022 1022
 		$share->setProviderId($this->identifier());
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
 			);
1134 1134
 		}
1135 1135
 
1136
-		$qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
1136
+		$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
1137 1137
 		$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
1138 1138
 
1139 1139
 		$qb->orderBy('id');
Please login to merge, or discard this patch.