Completed
Pull Request — master (#9488)
by John
26:02 queued 01:01
created
apps/dav/lib/DAV/SystemPrincipalBackend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 	 * @return array
164 164
 	 */
165 165
 	function getGroupMembership($principal) {
166
-		list($prefix, ) = \Sabre\Uri\split($principal);
166
+		list($prefix,) = \Sabre\Uri\split($principal);
167 167
 
168 168
 		if ($prefix === 'principals/system') {
169 169
 			$principal = $this->getPrincipalByPath($principal);
Please login to merge, or discard this patch.
lib/private/Calendar/Manager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	/**
31 31
 	 * @var ICalendar[] holds all registered calendars
32 32
 	 */
33
-	private $calendars=[];
33
+	private $calendars = [];
34 34
 
35 35
 	/**
36 36
 	 * @var \Closure[] to call to load/register calendar providers
37 37
 	 */
38
-	private $calendarLoaders=[];
38
+	private $calendarLoaders = [];
39 39
 
40 40
 	/**
41 41
 	 * This function is used to search and find objects within the user's calendars.
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	 * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs
51 51
 	 * @since 13.0.0
52 52
 	 */
53
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
53
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
54 54
 		$this->loadCalendars();
55 55
 		$result = [];
56
-		foreach($this->calendars as $calendar) {
56
+		foreach ($this->calendars as $calendar) {
57 57
 			$r = $calendar->search($pattern, $searchProperties, $options, $limit, $offset);
58
-			foreach($r as $o) {
58
+			foreach ($r as $o) {
59 59
 				$o['calendar-key'] = $calendar->getKey();
60 60
 				$result[] = $o;
61 61
 			}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * loads all calendars
133 133
 	 */
134 134
 	private function loadCalendars() {
135
-		foreach($this->calendarLoaders as $callable) {
135
+		foreach ($this->calendarLoaders as $callable) {
136 136
 			$callable($this);
137 137
 		}
138 138
 		$this->calendarLoaders = [];
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarImpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return array an array of events/journals/todos which are arrays of key-value-pairs
88 88
 	 * @since 13.0.0
89 89
 	 */
90
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
90
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
91 91
 		return $this->backend->search($this->calendarInfo, $pattern,
92 92
 			$searchProperties, $options, $limit, $offset);
93 93
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$permissions = $this->calendar->getACL();
101 101
 		$result = 0;
102 102
 		foreach ($permissions as $permission) {
103
-			switch($permission['privilege']) {
103
+			switch ($permission['privilege']) {
104 104
 				case '{DAV:}read':
105 105
 					$result |= Constants::PERMISSION_READ;
106 106
 					break;
Please login to merge, or discard this patch.
lib/private/Files/Config/UserMountCache.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 
90 90
 	public function registerMounts(IUser $user, array $mounts) {
91 91
 		// filter out non-proper storages coming from unit tests
92
-		$mounts = array_filter($mounts, function (IMountPoint $mount) {
92
+		$mounts = array_filter($mounts, function(IMountPoint $mount) {
93 93
 			return $mount instanceof SharedMount || $mount->getStorage() && $mount->getStorage()->getCache();
94 94
 		});
95 95
 		/** @var ICachedMountInfo[] $newMounts */
96
-		$newMounts = array_map(function (IMountPoint $mount) use ($user) {
96
+		$newMounts = array_map(function(IMountPoint $mount) use ($user) {
97 97
 			// filter out any storages which aren't scanned yet since we aren't interested in files from those storages (yet)
98 98
 			if ($mount->getStorageRootId() === -1) {
99 99
 				return null;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		$newMounts = array_values(array_filter($newMounts));
105 105
 
106 106
 		$cachedMounts = $this->getMountsForUser($user);
107
-		$mountDiff = function (ICachedMountInfo $mount1, ICachedMountInfo $mount2) {
107
+		$mountDiff = function(ICachedMountInfo $mount1, ICachedMountInfo $mount2) {
108 108
 			// since we are only looking for mounts for a specific user comparing on root id is enough
109 109
 			return $mount1->getRootId() - $mount2->getRootId();
110 110
 		};
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			], ['root_id', 'user_id']);
166 166
 		} else {
167 167
 			// in some cases this is legitimate, like orphaned shares
168
-			$this->logger->debug('Could not get storage info for mount at ' . $mount->getMountPoint());
168
+			$this->logger->debug('Could not get storage info for mount at '.$mount->getMountPoint());
169 169
 		}
170 170
 	}
171 171
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		if (!is_null($mount_id)) {
201 201
 			$mount_id = (int) $mount_id;
202 202
 		}
203
-		return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : '');
203
+		return new CachedMountInfo($user, (int) $row['storage_id'], (int) $row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : '');
204 204
 	}
205 205
 
206 206
 	/**
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
 			$row = $query->execute()->fetch();
275 275
 			if (is_array($row)) {
276 276
 				$this->cacheInfoCache[$fileId] = [
277
-					(int)$row['storage'],
277
+					(int) $row['storage'],
278 278
 					$row['path'],
279
-					(int)$row['mimetype']
279
+					(int) $row['mimetype']
280 280
 				];
281 281
 			} else {
282
-				throw new NotFoundException('File with id "' . $fileId . '" not found');
282
+				throw new NotFoundException('File with id "'.$fileId.'" not found');
283 283
 			}
284 284
 		}
285 285
 		return $this->cacheInfoCache[$fileId];
@@ -300,16 +300,16 @@  discard block
 block discarded – undo
300 300
 		$mountsForStorage = $this->getMountsForStorageId($storageId, $user);
301 301
 
302 302
 		// filter mounts that are from the same storage but a different directory
303
-		$filteredMounts = array_filter($mountsForStorage, function (ICachedMountInfo $mount) use ($internalPath, $fileId) {
303
+		$filteredMounts = array_filter($mountsForStorage, function(ICachedMountInfo $mount) use ($internalPath, $fileId) {
304 304
 			if ($fileId === $mount->getRootId()) {
305 305
 				return true;
306 306
 			}
307 307
 			$internalMountPath = $mount->getRootInternalPath();
308 308
 
309
-			return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath . '/';
309
+			return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath.'/';
310 310
 		});
311 311
 
312
-		return array_map(function (ICachedMountInfo $mount) use ($internalPath) {
312
+		return array_map(function(ICachedMountInfo $mount) use ($internalPath) {
313 313
 			return new CachedMountFileInfo(
314 314
 				$mount->getUser(),
315 315
 				$mount->getStorageId(),
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 			$slash
368 368
 		);
369 369
 
370
-		$userIds = array_map(function (IUser $user) {
370
+		$userIds = array_map(function(IUser $user) {
371 371
 			return $user->getUID();
372 372
 		}, $users);
373 373
 
Please login to merge, or discard this patch.
lib/private/Files/Storage/Wrapper/Jail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@
 block discarded – undo
56 56
 		if ($path === '') {
57 57
 			return $this->rootPath;
58 58
 		} else {
59
-			return $this->rootPath . '/' . $path;
59
+			return $this->rootPath.'/'.$path;
60 60
 		}
61 61
 	}
62 62
 
63 63
 	public function getJailedPath($path) {
64
-		$root = rtrim($this->rootPath, '/') . '/';
64
+		$root = rtrim($this->rootPath, '/').'/';
65 65
 
66 66
 		if (strpos($path, $root) !== 0) {
67 67
 			return null;
Please login to merge, or discard this patch.
apps/dav/lib/Controller/BirthdayCalendarController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 								IDBConnection $db, IConfig $config,
78 78
 								IJobList $jobList,
79 79
 								IUserManager $userManager,
80
-								CalDavBackend $calDavBackend){
80
+								CalDavBackend $calDavBackend) {
81 81
 		parent::__construct($appName, $request);
82 82
 		$this->db = $db;
83 83
 		$this->config = $config;
Please login to merge, or discard this patch.
apps/user_ldap/templates/part.wizardcontrols.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <div class="ldapWizardControls">
2
-	<span class="ldap_saving hidden"><?php p($l->t('Saving'));?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
2
+	<span class="ldap_saving hidden"><?php p($l->t('Saving')); ?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
3 3
 	<span class="ldap_config_state_indicator"></span> <span class="ldap_config_state_indicator_sign"></span>
4 4
 	<button class="ldap_action_back invisible" name="ldap_action_back"
5 5
 			type="button">
6
-		<?php p($l->t('Back'));?>
6
+		<?php p($l->t('Back')); ?>
7 7
 	</button>
8 8
 	<button class="ldap_action_continue primary" name="ldap_action_continue" type="button">
9
-		<?php p($l->t('Continue'));?>
9
+		<?php p($l->t('Continue')); ?>
10 10
 	</button>
11 11
 	<a href="<?php p(link_to_docs('admin-ldap')); ?>"
12 12
 		target="_blank" rel="noreferrer noopener">
13 13
 		<img src="<?php print_unescaped(image_path('', 'actions/info.svg')); ?>"
14 14
 			style="height:1.75ex" />
15
-		<span class="ldap_grey"><?php p($l->t('Help'));?></span>
15
+		<span class="ldap_grey"><?php p($l->t('Help')); ?></span>
16 16
 	</a>
17 17
 </div>
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
 		}
202 202
 
203 203
 		$data = array(
204
-			'attendee_name' => (string)$meetingAttendeeName ?: $defaultVal,
205
-			'invitee_name' => (string)$meetingInviteeName ?: $defaultVal,
206
-			'meeting_title' => (string)$meetingTitle ?: $defaultVal,
207
-			'meeting_description' => (string)$meetingDescription ?: $defaultVal,
208
-			'meeting_url' => (string)$meetingUrl ?: $defaultVal,
204
+			'attendee_name' => (string) $meetingAttendeeName ?: $defaultVal,
205
+			'invitee_name' => (string) $meetingInviteeName ?: $defaultVal,
206
+			'meeting_title' => (string) $meetingTitle ?: $defaultVal,
207
+			'meeting_description' => (string) $meetingDescription ?: $defaultVal,
208
+			'meeting_url' => (string) $meetingUrl ?: $defaultVal,
209 209
 		);
210 210
 
211 211
 		$fromEMail = \OCP\Util::getDefaultEmailAddress('invitations-noreply');
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 			->setReplyTo([$sender => $senderName])
217 217
 			->setTo([$recipient => $recipientName]);
218 218
 
219
-		$template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data);
219
+		$template = $this->mailer->createEMailTemplate('dav.calendarInvite.'.$method, $data);
220 220
 		$template->addHeader();
221 221
 
222 222
 		$this->addSubjectAndHeading($template, $l10n, $method, $summary,
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
 
230 230
 		$attachment = $this->mailer->createAttachment(
231 231
 			$iTipMessage->message->serialize(),
232
-			'event.ics',// TODO(leon): Make file name unique, e.g. add event id
233
-			'text/calendar; method=' . $iTipMessage->method
232
+			'event.ics', // TODO(leon): Make file name unique, e.g. add event id
233
+			'text/calendar; method='.$iTipMessage->method
234 234
 		);
235 235
 		$message->attach($attachment);
236 236
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 				$this->logger->error('Unable to deliver message to {failed}', ['app' => 'dav', 'failed' =>  implode(', ', $failed)]);
242 242
 				$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
243 243
 			}
244
-		} catch(\Exception $ex) {
244
+		} catch (\Exception $ex) {
245 245
 			$this->logger->logException($ex, ['app' => 'dav']);
246 246
 			$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
247 247
 		}
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
 				$lastOccurrence = $firstOccurrence;
278 278
 			}
279 279
 		} else {
280
-			$it = new EventIterator($vObject, (string)$component->UID);
280
+			$it = new EventIterator($vObject, (string) $component->UID);
281 281
 			$maxDate = new \DateTime(self::MAX_DATE);
282 282
 			if ($it->isInfinite()) {
283 283
 				$lastOccurrence = $maxDate->getTimestamp();
284 284
 			} else {
285 285
 				$end = $it->getDtEnd();
286
-				while($it->valid() && $end < $maxDate) {
286
+				while ($it->valid() && $end < $maxDate) {
287 287
 					$end = $it->getDtEnd();
288 288
 					$it->next();
289 289
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 			$localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']);
360 360
 			$localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']);
361 361
 
362
-			return $localeStart . ' - ' . $localeEnd;
362
+			return $localeStart.' - '.$localeEnd;
363 363
 		}
364 364
 
365 365
 		/** @var Property\ICalendar\DateTime $dtstart */
@@ -378,26 +378,26 @@  discard block
 block discarded – undo
378 378
 			}
379 379
 		}
380 380
 
381
-		$localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']) . ', ' .
381
+		$localeStart = $l10n->l('weekdayName', $dtstartDt, ['width' => 'abbreviated']).', '.
382 382
 			$l10n->l('datetime', $dtstartDt, ['width' => 'medium|short']);
383 383
 
384 384
 		// always show full date with timezone if timezones are different
385 385
 		if ($startTimezone !== $endTimezone) {
386 386
 			$localeEnd = $l10n->l('datetime', $dtendDt, ['width' => 'medium|short']);
387 387
 
388
-			return $localeStart . ' (' . $startTimezone . ') - ' .
389
-				$localeEnd . ' (' . $endTimezone . ')';
388
+			return $localeStart.' ('.$startTimezone.') - '.
389
+				$localeEnd.' ('.$endTimezone.')';
390 390
 		}
391 391
 
392 392
 		// show only end time if date is the same
393 393
 		if ($this->isDayEqual($dtstartDt, $dtendDt)) {
394 394
 			$localeEnd = $l10n->l('time', $dtendDt, ['width' => 'short']);
395 395
 		} else {
396
-			$localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']) . ', ' .
396
+			$localeEnd = $l10n->l('weekdayName', $dtendDt, ['width' => 'abbreviated']).', '.
397 397
 				$l10n->l('datetime', $dtendDt, ['width' => 'medium|short']);
398 398
 		}
399 399
 
400
-		return  $localeStart . ' - ' . $localeEnd . ' (' . $startTimezone . ')';
400
+		return  $localeStart.' - '.$localeEnd.' ('.$startTimezone.')';
401 401
 	}
402 402
 
403 403
 	/**
@@ -420,15 +420,15 @@  discard block
 block discarded – undo
420 420
 	private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n,
421 421
 										  $method, $summary, $attendeeName, $inviteeName) {
422 422
 		if ($method === self::METHOD_CANCEL) {
423
-			$template->setSubject('Cancelled: ' . $summary);
423
+			$template->setSubject('Cancelled: '.$summary);
424 424
 			$template->addHeading($l10n->t('Invitation canceled'), $l10n->t('Hello %s,', [$attendeeName]));
425 425
 			$template->addBodyText($l10n->t('The meeting »%s« with %s was canceled.', [$summary, $inviteeName]));
426 426
 		} else if ($method === self::METHOD_REPLY) {
427
-			$template->setSubject('Re: ' . $summary);
427
+			$template->setSubject('Re: '.$summary);
428 428
 			$template->addHeading($l10n->t('Invitation updated'), $l10n->t('Hello %s,', [$attendeeName]));
429 429
 			$template->addBodyText($l10n->t('The meeting »%s« with %s was updated.', [$summary, $inviteeName]));
430 430
 		} else {
431
-			$template->setSubject('Invitation: ' . $summary);
431
+			$template->setSubject('Invitation: '.$summary);
432 432
 			$template->addHeading($l10n->t('%s invited you to »%s«', [$inviteeName, $summary]), $l10n->t('Hello %s,', [$attendeeName]));
433 433
 		}
434 434
 
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
451 451
 				$this->getAbsoluteImagePath('filetypes/location.svg'));
452 452
 		}
453 453
 		if ($description) {
454
-			$template->addBodyListItem((string)$description, $l10n->t('Description:'),
454
+			$template->addBodyListItem((string) $description, $l10n->t('Description:'),
455 455
 				$this->getAbsoluteImagePath('filetypes/text.svg'));
456 456
 		}
457 457
 		if ($url) {
458
-			$template->addBodyListItem((string)$url, $l10n->t('Link:'),
458
+			$template->addBodyListItem((string) $url, $l10n->t('Link:'),
459 459
 				$this->getAbsoluteImagePath('filetypes/link.svg'));
460 460
 		}
461 461
 	}
Please login to merge, or discard this patch.
core/templates/lostpassword/resetpassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 		</p>
35 35
 		<input class="primary" type="submit" id="submit" value="<?php p($l->t('Reset password')); ?>" />
36 36
 		<p class="text-center">
37
-			<img class="hidden" id="float-spinner" src="<?php p(image_path('core', 'loading-dark.gif'));?>"/>
37
+			<img class="hidden" id="float-spinner" src="<?php p(image_path('core', 'loading-dark.gif')); ?>"/>
38 38
 		</p>
39 39
 	</fieldset>
40 40
 </form>
Please login to merge, or discard this patch.