Passed
Push — master ( 32f79c...03cdff )
by Roeland
10:27 queued 11s
created
lib/public/Activity/IExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
 	const METHOD_STREAM = 'stream';
37 37
 	const METHOD_MAIL = 'email';
38 38
 
39
-	const PRIORITY_VERYLOW 	= 10;
40
-	const PRIORITY_LOW	= 20;
41
-	const PRIORITY_MEDIUM	= 30;
42
-	const PRIORITY_HIGH	= 40;
43
-	const PRIORITY_VERYHIGH	= 50;
39
+	const PRIORITY_VERYLOW = 10;
40
+	const PRIORITY_LOW = 20;
41
+	const PRIORITY_MEDIUM = 30;
42
+	const PRIORITY_HIGH = 40;
43
+	const PRIORITY_VERYHIGH = 50;
44 44
 }
Please login to merge, or discard this patch.
lib/private/Activity/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 		}
89 89
 
90 90
 		$this->consumers = [];
91
-		foreach($this->consumersClosures as $consumer) {
91
+		foreach ($this->consumersClosures as $consumer) {
92 92
 			$c = $consumer();
93 93
 			if ($c instanceof IConsumer) {
94 94
 				$this->consumers[] = $c;
Please login to merge, or discard this patch.
apps/dav/lib/Command/MoveCalendar.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -118,19 +118,19 @@  discard block
 block discarded – undo
118 118
 
119 119
 		$name = $input->getArgument('name');
120 120
 
121
-		$calendar = $this->calDav->getCalendarByUri(self::URI_USERS . $userOrigin, $name);
121
+		$calendar = $this->calDav->getCalendarByUri(self::URI_USERS.$userOrigin, $name);
122 122
 
123 123
 		if (null === $calendar) {
124 124
 			throw new \InvalidArgumentException("User <$userOrigin> has no calendar named <$name>. You can run occ dav:list-calendars to list calendars URIs for this user.");
125 125
 		}
126 126
 
127
-		if (null !== $this->calDav->getCalendarByUri(self::URI_USERS . $userDestination, $name)) {
127
+		if (null !== $this->calDav->getCalendarByUri(self::URI_USERS.$userDestination, $name)) {
128 128
 			throw new \InvalidArgumentException("User <$userDestination> already has a calendar named <$name>.");
129 129
 		}
130 130
 
131 131
 		$this->checkShares($calendar, $userOrigin, $userDestination, $input->getOption('force'));
132 132
 
133
-		$this->calDav->moveCalendar($name, self::URI_USERS . $userOrigin, self::URI_USERS . $userDestination);
133
+		$this->calDav->moveCalendar($name, self::URI_USERS.$userOrigin, self::URI_USERS.$userDestination);
134 134
 
135 135
 		$this->io->success("Calendar <$name> was moved from user <$userOrigin> to <$userDestination>");
136 136
 	}
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 			 */
156 156
 			if ($this->shareManager->shareWithGroupMembersOnly() === true && 'groups' === $prefix && !$this->groupManager->isInGroup($userDestination, $userOrGroup)) {
157 157
 				if ($force) {
158
-					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/groups/' . $userOrGroup]);
158
+					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/groups/'.$userOrGroup]);
159 159
 				} else {
160
-					throw new \InvalidArgumentException("User <$userDestination> is not part of the group <$userOrGroup> with whom the calendar <" . $calendar['uri'] . "> was shared. You may use -f to move the calendar while deleting this share.");
160
+					throw new \InvalidArgumentException("User <$userDestination> is not part of the group <$userOrGroup> with whom the calendar <".$calendar['uri']."> was shared. You may use -f to move the calendar while deleting this share.");
161 161
 				}
162 162
 			}
163 163
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 			 */
167 167
 			if ($userOrGroup === $userDestination) {
168 168
 				if ($force) {
169
-					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/users/' . $userOrGroup]);
169
+					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/users/'.$userOrGroup]);
170 170
 				} else {
171
-					throw new \InvalidArgumentException("The calendar <" . $calendar['uri'] . "> is already shared to user <$userDestination>.You may use -f to move the calendar while deleting this share.");
171
+					throw new \InvalidArgumentException("The calendar <".$calendar['uri']."> is already shared to user <$userDestination>.You may use -f to move the calendar while deleting this share.");
172 172
 				}
173 173
 			}
174 174
 		}
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 		 */
178 178
 		if (count($shares) > 0) {
179 179
 			$this->io->note([
180
-				"Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.", 
181
-				"Sharees will need to change \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userDestination\""
180
+				"Please note that moving calendar ".$calendar['uri']." from user <$userOrigin> to <$userDestination> has caused share links to change.", 
181
+				"Sharees will need to change \"example.com/remote.php/dav/calendars/uid/".$calendar['uri']."_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/".$calendar['uri']."_shared_by_$userDestination\""
182 182
 			]);
183 183
 		}
184 184
 	}
Please login to merge, or discard this patch.
apps/dav/lib/Command/ListCalendars.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 		$calendars = $this->caldav->getCalendarsForUser("principals/users/$user");
74 74
 
75 75
 		$calendarTableData = [];
76
-		foreach($calendars as $calendar) {
76
+		foreach ($calendars as $calendar) {
77 77
 			// skip birthday calendar
78 78
 			if ($calendar['uri'] === BirthdayService::BIRTHDAY_CALENDAR_URI) {
79 79
 				continue;
80 80
 			}
81 81
 
82 82
 			$readOnly = false;
83
-			$readOnlyIndex = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
83
+			$readOnlyIndex = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only';
84 84
 			if (isset($calendar[$readOnlyIndex])) {
85 85
 				$readOnly = $calendar[$readOnlyIndex];
86 86
 			}
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 			$calendarTableData[] = [
89 89
 				$calendar['uri'],
90 90
 				$calendar['{DAV:}displayname'],
91
-				$calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'],
92
-				$calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'],
91
+				$calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal'],
92
+				$calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname'],
93 93
 				$readOnly ? ' x ' : ' ✓ ',
94 94
 			];
95 95
 		}
Please login to merge, or discard this patch.
lib/private/SubAdmin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 			->execute();
118 118
 
119 119
 		$groups = [];
120
-		while($row = $result->fetch()) {
120
+		while ($row = $result->fetch()) {
121 121
 			$group = $this->groupManager->get($row['gid']);
122
-			if(!is_null($group)) {
122
+			if (!is_null($group)) {
123 123
 				$groups[$group->getGID()] = $group;
124 124
 			}
125 125
 		}
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
 			->execute();
154 154
 
155 155
 		$users = [];
156
-		while($row = $result->fetch()) {
156
+		while ($row = $result->fetch()) {
157 157
 			$user = $this->userManager->get($row['uid']);
158
-			if(!is_null($user)) {
158
+			if (!is_null($user)) {
159 159
 				$users[] = $user;
160 160
 			}
161 161
 		}
@@ -176,10 +176,10 @@  discard block
 block discarded – undo
176 176
 			->execute();
177 177
 
178 178
 		$subadmins = [];
179
-		while($row = $result->fetch()) {
179
+		while ($row = $result->fetch()) {
180 180
 			$user = $this->userManager->get($row['uid']);
181 181
 			$group = $this->groupManager->get($row['gid']);
182
-			if(!is_null($user) && !is_null($group)) {
182
+			if (!is_null($user) && !is_null($group)) {
183 183
 				$subadmins[] = [
184 184
 					'user'  => $user,
185 185
 					'group' => $group
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 			->andWhere($qb->expr()->eq('uid', $qb->createNamedParameter($user->getUID())))
210 210
 			->execute();
211 211
 
212
-		$fetch =  $result->fetch();
212
+		$fetch = $result->fetch();
213 213
 		$result->closeCursor();
214 214
 		$result = !empty($fetch) ? true : false;
215 215
 
@@ -248,15 +248,15 @@  discard block
 block discarded – undo
248 248
 	 * @return bool
249 249
 	 */
250 250
 	public function isUserAccessible(IUser $subadmin, IUser $user): bool {
251
-		if(!$this->isSubAdmin($subadmin)) {
251
+		if (!$this->isSubAdmin($subadmin)) {
252 252
 			return false;
253 253
 		}
254
-		if($this->groupManager->isAdmin($user->getUID())) {
254
+		if ($this->groupManager->isAdmin($user->getUID())) {
255 255
 			return false;
256 256
 		}
257 257
 		$accessibleGroups = $this->getSubAdminsGroups($subadmin);
258
-		foreach($accessibleGroups as $accessibleGroup) {
259
-			if($accessibleGroup->inGroup($user)) {
258
+		foreach ($accessibleGroups as $accessibleGroup) {
259
+			if ($accessibleGroup->inGroup($user)) {
260 260
 				return true;
261 261
 			}
262 262
 		}
Please login to merge, or discard this patch.
core/templates/layout.guest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@
 block discarded – undo
18 18
 		<?php emit_script_loading_tags($_); ?>
19 19
 		<?php print_unescaped($_['headers']); ?>
20 20
 	</head>
21
-	<body id="<?php p($_['bodyid']);?>">
21
+	<body id="<?php p($_['bodyid']); ?>">
22 22
 		<?php include 'layout.noscript.warning.php'; ?>
23 23
 		<?php foreach ($_['initialStates'] as $app => $initialState) { ?>
24 24
 			<input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
25 25
 		<?php }?>
26 26
 		<div class="wrapper">
27 27
 			<div class="v-align">
28
-				<?php if ($_['bodyid'] === 'body-login' ): ?>
28
+				<?php if ($_['bodyid'] === 'body-login'): ?>
29 29
 					<header role="banner">
30 30
 						<div id="header">
31 31
 							<div class="logo">
32 32
 								<h1 class="hidden-visually">
33 33
 									<?php p($theme->getName()); ?>
34 34
 								</h1>
35
-								<?php if(\OC::$server->getConfig()->getSystemValue('installed', false)
35
+								<?php if (\OC::$server->getConfig()->getSystemValue('installed', false)
36 36
 									&& \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
37 37
 									<img src="<?php p($theme->getLogo()); ?>"/>
38 38
 								<?php endif; ?>
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Trash/LegacyTrashBackend.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	private function mapTrashItems(array $items, IUser $user, ITrashItem $parent = null): array {
53 53
 		$parentTrashPath = ($parent instanceof ITrashItem) ? $parent->getTrashPath() : '';
54 54
 		$isRoot = $parent === null;
55
-		return array_map(function (FileInfo $file) use ($parent, $parentTrashPath, $isRoot, $user) {
56
-			$originalLocation = $isRoot ? $file['extraData'] : $parent->getOriginalLocation() . '/' . $file->getName();
55
+		return array_map(function(FileInfo $file) use ($parent, $parentTrashPath, $isRoot, $user) {
56
+			$originalLocation = $isRoot ? $file['extraData'] : $parent->getOriginalLocation().'/'.$file->getName();
57 57
 			if (!$originalLocation) {
58 58
 				$originalLocation = $file->getName();
59 59
 			}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				$this,
62 62
 				$originalLocation,
63 63
 				$file->getMTime(),
64
-				$parentTrashPath . '/' . $file->getName() . ($isRoot ? '.d' . $file->getMtime() : ''),
64
+				$parentTrashPath.'/'.$file->getName().($isRoot ? '.d'.$file->getMtime() : ''),
65 65
 				$file,
66 66
 				$user
67 67
 			);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	public function listTrashFolder(ITrashItem $folder): array {
77 77
 		$user = $folder->getUser();
78 78
 		$entries = Helper::getTrashFiles($folder->getTrashPath(), $user->getUID());
79
-		return $this->mapTrashItems($entries, $user ,$folder);
79
+		return $this->mapTrashItems($entries, $user, $folder);
80 80
 	}
81 81
 
82 82
 	public function restoreItem(ITrashItem $item) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	public function removeItem(ITrashItem $item) {
87 87
 		$user = $item->getUser();
88 88
 		if ($item->isRootItem()) {
89
-			$path = substr($item->getTrashPath(), 0, -strlen('.d' . $item->getDeletedTime()));
89
+			$path = substr($item->getTrashPath(), 0, -strlen('.d'.$item->getDeletedTime()));
90 90
 			Trashbin::delete($path, $user->getUID(), $item->getDeletedTime());
91 91
 		} else {
92 92
 			Trashbin::delete($item->getTrashPath(), $user->getUID(), null);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		if (!$storage instanceof Storage) {
99 99
 			return false;
100 100
 		}
101
-		$normalized = Filesystem::normalizePath($storage->getMountPoint() . '/' . $internalPath, true, false, true);
101
+		$normalized = Filesystem::normalizePath($storage->getMountPoint().'/'.$internalPath, true, false, true);
102 102
 		$view = Filesystem::getView();
103 103
 		if (!isset($this->deletedFiles[$normalized]) && $view instanceof View) {
104 104
 			$this->deletedFiles[$normalized] = $normalized;
Please login to merge, or discard this patch.
apps/files_versions/lib/Versions/LegacyVersionsBackend.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 		$file2 = array_pop($nodes);
56 56
 		$versions = Storage::getVersions($user->getUID(), $userFolder->getRelativePath($file2->getPath()));
57 57
 
58
-		return array_map(function (array $data) use ($file, $user) {
58
+		return array_map(function(array $data) use ($file, $user) {
59 59
 			return new Version(
60
-				(int)$data['version'],
61
-				(int)$data['version'],
60
+				(int) $data['version'],
61
+				(int) $data['version'],
62 62
 				$data['name'],
63
-				(int)$data['size'],
63
+				(int) $data['size'],
64 64
 				$data['mimetype'],
65 65
 				$data['path'],
66 66
 				$file,
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
 	public function createVersion(IUser $user, FileInfo $file) {
74 74
 		$userFolder = $this->rootFolder->getUserFolder($user->getUID());
75 75
 		$relativePath = $userFolder->getRelativePath($file->getPath());
76
-		$userView = new View('/' . $user->getUID());
76
+		$userView = new View('/'.$user->getUID());
77 77
 		// create all parent folders
78 78
 		Storage::createMissingDirectories($relativePath, $userView);
79 79
 
80 80
 		Storage::scheduleExpire($user->getUID(), $relativePath);
81 81
 
82 82
 		// store a new version of a file
83
-		$userView->copy('files/' . $relativePath, 'files_versions/' . $relativePath . '.v' . $file->getMtime());
83
+		$userView->copy('files/'.$relativePath, 'files_versions/'.$relativePath.'.v'.$file->getMtime());
84 84
 		// ensure the file is scanned
85
-		$userView->getFileInfo('files_versions/' . $relativePath . '.v' . $file->getMtime());
85
+		$userView->getFileInfo('files_versions/'.$relativePath.'.v'.$file->getMtime());
86 86
 	}
87 87
 
88 88
 	public function rollback(IVersion $version) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	public function read(IVersion $version) {
105 105
 		$versions = $this->getVersionFolder($version->getUser());
106 106
 		/** @var File $file */
107
-		$file = $versions->get($version->getVersionPath() . '.v' . $version->getRevisionId());
107
+		$file = $versions->get($version->getVersionPath().'.v'.$version->getRevisionId());
108 108
 		return $file->fopen('r');
109 109
 	}
110 110
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$userFolder = $this->rootFolder->getUserFolder($user->getUID());
113 113
 		$versionFolder = $this->getVersionFolder($user);
114 114
 		/** @var File $file */
115
-		$file = $versionFolder->get($userFolder->getRelativePath($sourceFile->getPath()) . '.v' . $revision);
115
+		$file = $versionFolder->get($userFolder->getRelativePath($sourceFile->getPath()).'.v'.$revision);
116 116
 		return $file;
117 117
 	}
118 118
 }
Please login to merge, or discard this patch.
lib/private/InitialStateService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 			return;
54 54
 		}
55 55
 
56
-		$this->logger->warning('Invalid data provided to provideInitialState by ' . $appName);
56
+		$this->logger->warning('Invalid data provided to provideInitialState by '.$appName);
57 57
 	}
58 58
 
59 59
 	public function provideLazyInitialState(string $appName, string $key, Closure $closure): void {
Please login to merge, or discard this patch.