Passed
Push — master ( b2aec1...505fc0 )
by Roeland
09:14
created
apps/dav/lib/CalDAV/WebcalCaching/Plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	/**
50 50
 	 * @var bool
51 51
 	 */
52
-	private $enabled=false;
52
+	private $enabled = false;
53 53
 
54 54
 	/**
55 55
 	 * @var Server
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		}
104 104
 
105 105
 		// $calendarHomePath will look like: calendars/username
106
-		$calendarHomePath = $pathParts[0] . '/' . $pathParts[1];
106
+		$calendarHomePath = $pathParts[0].'/'.$pathParts[1];
107 107
 		try {
108 108
 			$calendarHome = $this->server->tree->getNodeForPath($calendarHomePath);
109 109
 			if (!($calendarHome instanceof CalendarHome)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			}
113 113
 
114 114
 			$calendarHome->enableCachedSubscriptionsForThisRequest();
115
-		} catch(NotFound $ex) {
115
+		} catch (NotFound $ex) {
116 116
 			return;
117 117
 		}
118 118
 	}
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarHome.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	private $config;
45 45
 
46 46
 	/** @var bool */
47
-	private $returnCachedSubscriptions=false;
47
+	private $returnCachedSubscriptions = false;
48 48
 
49 49
 	public function __construct(BackendInterface $caldavBackend, $principalInfo) {
50 50
 		parent::__construct($caldavBackend, $principalInfo);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 		}
143 143
 
144
-		throw new NotFound('Node with name \'' . $name . '\' could not be found');
144
+		throw new NotFound('Node with name \''.$name.'\' could not be found');
145 145
 	}
146 146
 
147 147
 	/**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 * @param integer|null $limit
150 150
 	 * @param integer|null $offset
151 151
 	 */
152
-	function calendarSearch(array $filters, $limit=null, $offset=null) {
152
+	function calendarSearch(array $filters, $limit = null, $offset = null) {
153 153
 		$principalUri = $this->principalInfo['uri'];
154 154
 		return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset);
155 155
 	}
Please login to merge, or discard this patch.
apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 		$stmt = $query->execute();
67 67
 
68 68
 		$count = 0;
69
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
69
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
70 70
 			$args = [
71 71
 				'principaluri' => $row['principaluri'],
72 72
 				'uri' => $row['uri'],
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Activity/Provider/Calendar.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -98,44 +98,44 @@  discard block
 block discarded – undo
98 98
 
99 99
 		if ($event->getSubject() === self::SUBJECT_ADD) {
100 100
 			$subject = $this->l->t('{actor} created calendar {calendar}');
101
-		} else if ($event->getSubject() === self::SUBJECT_ADD . '_self') {
101
+		} else if ($event->getSubject() === self::SUBJECT_ADD.'_self') {
102 102
 			$subject = $this->l->t('You created calendar {calendar}');
103 103
 		} else if ($event->getSubject() === self::SUBJECT_DELETE) {
104 104
 			$subject = $this->l->t('{actor} deleted calendar {calendar}');
105
-		} else if ($event->getSubject() === self::SUBJECT_DELETE . '_self') {
105
+		} else if ($event->getSubject() === self::SUBJECT_DELETE.'_self') {
106 106
 			$subject = $this->l->t('You deleted calendar {calendar}');
107 107
 		} else if ($event->getSubject() === self::SUBJECT_UPDATE) {
108 108
 			$subject = $this->l->t('{actor} updated calendar {calendar}');
109
-		} else if ($event->getSubject() === self::SUBJECT_UPDATE . '_self') {
109
+		} else if ($event->getSubject() === self::SUBJECT_UPDATE.'_self') {
110 110
 			$subject = $this->l->t('You updated calendar {calendar}');
111 111
 
112
-		} else if ($event->getSubject() === self::SUBJECT_PUBLISH . '_self') {
112
+		} else if ($event->getSubject() === self::SUBJECT_PUBLISH.'_self') {
113 113
 			$subject = $this->l->t('You shared calendar {calendar} as public link');
114
-		} else if ($event->getSubject() === self::SUBJECT_UNPUBLISH . '_self') {
114
+		} else if ($event->getSubject() === self::SUBJECT_UNPUBLISH.'_self') {
115 115
 			$subject = $this->l->t('You removed public link for calendar {calendar}');
116 116
 
117 117
 		} else if ($event->getSubject() === self::SUBJECT_SHARE_USER) {
118 118
 			$subject = $this->l->t('{actor} shared calendar {calendar} with you');
119
-		} else if ($event->getSubject() === self::SUBJECT_SHARE_USER . '_you') {
119
+		} else if ($event->getSubject() === self::SUBJECT_SHARE_USER.'_you') {
120 120
 			$subject = $this->l->t('You shared calendar {calendar} with {user}');
121
-		} else if ($event->getSubject() === self::SUBJECT_SHARE_USER . '_by') {
121
+		} else if ($event->getSubject() === self::SUBJECT_SHARE_USER.'_by') {
122 122
 			$subject = $this->l->t('{actor} shared calendar {calendar} with {user}');
123 123
 		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER) {
124 124
 			$subject = $this->l->t('{actor} unshared calendar {calendar} from you');
125
-		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_you') {
125
+		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER.'_you') {
126 126
 			$subject = $this->l->t('You unshared calendar {calendar} from {user}');
127
-		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_by') {
127
+		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER.'_by') {
128 128
 			$subject = $this->l->t('{actor} unshared calendar {calendar} from {user}');
129
-		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_self') {
129
+		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER.'_self') {
130 130
 			$subject = $this->l->t('{actor} unshared calendar {calendar} from themselves');
131 131
 
132
-		} else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_you') {
132
+		} else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP.'_you') {
133 133
 			$subject = $this->l->t('You shared calendar {calendar} with group {group}');
134
-		} else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_by') {
134
+		} else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP.'_by') {
135 135
 			$subject = $this->l->t('{actor} shared calendar {calendar} with group {group}');
136
-		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_you') {
136
+		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP.'_you') {
137 137
 			$subject = $this->l->t('You unshared calendar {calendar} from group {group}');
138
-		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_by') {
138
+		} else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP.'_by') {
139 139
 			$subject = $this->l->t('{actor} unshared calendar {calendar} from group {group}');
140 140
 		} else {
141 141
 			throw new \InvalidArgumentException();
@@ -171,41 +171,41 @@  discard block
 block discarded – undo
171 171
 		if (isset($parameters['calendar'])) {
172 172
 			switch ($subject) {
173 173
 				case self::SUBJECT_ADD:
174
-				case self::SUBJECT_ADD . '_self':
174
+				case self::SUBJECT_ADD.'_self':
175 175
 				case self::SUBJECT_DELETE:
176
-				case self::SUBJECT_DELETE . '_self':
176
+				case self::SUBJECT_DELETE.'_self':
177 177
 				case self::SUBJECT_UPDATE:
178
-				case self::SUBJECT_UPDATE . '_self':
179
-				case self::SUBJECT_PUBLISH . '_self':
180
-				case self::SUBJECT_UNPUBLISH . '_self':
178
+				case self::SUBJECT_UPDATE.'_self':
179
+				case self::SUBJECT_PUBLISH.'_self':
180
+				case self::SUBJECT_UNPUBLISH.'_self':
181 181
 				case self::SUBJECT_SHARE_USER:
182 182
 				case self::SUBJECT_UNSHARE_USER:
183
-				case self::SUBJECT_UNSHARE_USER . '_self':
183
+				case self::SUBJECT_UNSHARE_USER.'_self':
184 184
 					return [
185 185
 						'actor' => $this->generateUserParameter($parameters['actor']),
186 186
 						'calendar' => $this->generateCalendarParameter($parameters['calendar'], $this->l),
187 187
 					];
188
-				case self::SUBJECT_SHARE_USER . '_you':
189
-				case self::SUBJECT_UNSHARE_USER . '_you':
188
+				case self::SUBJECT_SHARE_USER.'_you':
189
+				case self::SUBJECT_UNSHARE_USER.'_you':
190 190
 					return [
191 191
 						'calendar' => $this->generateCalendarParameter($parameters['calendar'], $this->l),
192 192
 						'user' => $this->generateUserParameter($parameters['user']),
193 193
 					];
194
-				case self::SUBJECT_SHARE_USER . '_by':
195
-				case self::SUBJECT_UNSHARE_USER . '_by':
194
+				case self::SUBJECT_SHARE_USER.'_by':
195
+				case self::SUBJECT_UNSHARE_USER.'_by':
196 196
 					return [
197 197
 						'actor' => $this->generateUserParameter($parameters['actor']),
198 198
 						'calendar' => $this->generateCalendarParameter($parameters['calendar'], $this->l),
199 199
 						'user' => $this->generateUserParameter($parameters['user']),
200 200
 					];
201
-				case self::SUBJECT_SHARE_GROUP . '_you':
202
-				case self::SUBJECT_UNSHARE_GROUP . '_you':
201
+				case self::SUBJECT_SHARE_GROUP.'_you':
202
+				case self::SUBJECT_UNSHARE_GROUP.'_you':
203 203
 					return [
204 204
 						'calendar' => $this->generateCalendarParameter($parameters['calendar'], $this->l),
205 205
 						'group' => $this->generateGroupParameter($parameters['group']),
206 206
 					];
207
-				case self::SUBJECT_SHARE_GROUP . '_by':
208
-				case self::SUBJECT_UNSHARE_GROUP . '_by':
207
+				case self::SUBJECT_SHARE_GROUP.'_by':
208
+				case self::SUBJECT_UNSHARE_GROUP.'_by':
209 209
 					return [
210 210
 						'actor' => $this->generateUserParameter($parameters['actor']),
211 211
 						'calendar' => $this->generateCalendarParameter($parameters['calendar'], $this->l),
@@ -221,44 +221,44 @@  discard block
 block discarded – undo
221 221
 		// they will get the dead entries in their stream.
222 222
 		switch ($subject) {
223 223
 			case self::SUBJECT_ADD:
224
-			case self::SUBJECT_ADD . '_self':
224
+			case self::SUBJECT_ADD.'_self':
225 225
 			case self::SUBJECT_DELETE:
226
-			case self::SUBJECT_DELETE . '_self':
226
+			case self::SUBJECT_DELETE.'_self':
227 227
 			case self::SUBJECT_UPDATE:
228
-			case self::SUBJECT_UPDATE . '_self':
229
-			case self::SUBJECT_PUBLISH . '_self':
230
-			case self::SUBJECT_UNPUBLISH . '_self':
228
+			case self::SUBJECT_UPDATE.'_self':
229
+			case self::SUBJECT_PUBLISH.'_self':
230
+			case self::SUBJECT_UNPUBLISH.'_self':
231 231
 			case self::SUBJECT_SHARE_USER:
232 232
 			case self::SUBJECT_UNSHARE_USER:
233
-			case self::SUBJECT_UNSHARE_USER . '_self':
233
+			case self::SUBJECT_UNSHARE_USER.'_self':
234 234
 				return [
235 235
 					'actor' => $this->generateUserParameter($parameters[0]),
236
-					'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
236
+					'calendar' => $this->generateLegacyCalendarParameter((int) $event->getObjectId(), $parameters[1]),
237 237
 				];
238
-			case self::SUBJECT_SHARE_USER . '_you':
239
-			case self::SUBJECT_UNSHARE_USER . '_you':
238
+			case self::SUBJECT_SHARE_USER.'_you':
239
+			case self::SUBJECT_UNSHARE_USER.'_you':
240 240
 				return [
241 241
 					'user' => $this->generateUserParameter($parameters[0]),
242
-					'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
242
+					'calendar' => $this->generateLegacyCalendarParameter((int) $event->getObjectId(), $parameters[1]),
243 243
 				];
244
-			case self::SUBJECT_SHARE_USER . '_by':
245
-			case self::SUBJECT_UNSHARE_USER . '_by':
244
+			case self::SUBJECT_SHARE_USER.'_by':
245
+			case self::SUBJECT_UNSHARE_USER.'_by':
246 246
 				return [
247 247
 					'user' => $this->generateUserParameter($parameters[0]),
248
-					'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
248
+					'calendar' => $this->generateLegacyCalendarParameter((int) $event->getObjectId(), $parameters[1]),
249 249
 					'actor' => $this->generateUserParameter($parameters[2]),
250 250
 				];
251
-			case self::SUBJECT_SHARE_GROUP . '_you':
252
-			case self::SUBJECT_UNSHARE_GROUP . '_you':
251
+			case self::SUBJECT_SHARE_GROUP.'_you':
252
+			case self::SUBJECT_UNSHARE_GROUP.'_you':
253 253
 				return [
254 254
 					'group' => $this->generateGroupParameter($parameters[0]),
255
-					'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
255
+					'calendar' => $this->generateLegacyCalendarParameter((int) $event->getObjectId(), $parameters[1]),
256 256
 				];
257
-			case self::SUBJECT_SHARE_GROUP . '_by':
258
-			case self::SUBJECT_UNSHARE_GROUP . '_by':
257
+			case self::SUBJECT_SHARE_GROUP.'_by':
258
+			case self::SUBJECT_UNSHARE_GROUP.'_by':
259 259
 				return [
260 260
 					'group' => $this->generateGroupParameter($parameters[0]),
261
-					'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
261
+					'calendar' => $this->generateLegacyCalendarParameter((int) $event->getObjectId(), $parameters[1]),
262 262
 					'actor' => $this->generateUserParameter($parameters[2]),
263 263
 				];
264 264
 		}
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/ObjectTree.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			if (isset($info['transferid'])) {
91 91
 				// getNodePath is called for multiple nodes within a chunk
92 92
 				// upload call
93
-				$path = $dir . '/' . $info['name'];
93
+				$path = $dir.'/'.$info['name'];
94 94
 				$path = ltrim($path, '/');
95 95
 			}
96 96
 		}
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			} catch (StorageNotAvailableException $e) {
162 162
 				throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available', 0, $e);
163 163
 			} catch (StorageInvalidException $e) {
164
-				throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
164
+				throw new \Sabre\DAV\Exception\NotFound('Storage '.$path.' is invalid');
165 165
 			} catch (LockedException $e) {
166 166
 				throw new \Sabre\DAV\Exception\Locked();
167 167
 			} catch (ForbiddenException $e) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		}
171 171
 
172 172
 		if (!$info) {
173
-			throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
173
+			throw new \Sabre\DAV\Exception\NotFound('File with name '.$path.' could not be located');
174 174
 		}
175 175
 
176 176
 		if ($info->getType() === 'dir') {
Please login to merge, or discard this patch.
core/Command/Base.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,19 +73,19 @@
 block discarded – undo
73 73
 			default:
74 74
 				foreach ($items as $key => $item) {
75 75
 					if (is_array($item)) {
76
-						$output->writeln($prefix . $key . ':');
77
-						$this->writeArrayInOutputFormat($input, $output, $item, '  ' . $prefix);
76
+						$output->writeln($prefix.$key.':');
77
+						$this->writeArrayInOutputFormat($input, $output, $item, '  '.$prefix);
78 78
 						continue;
79 79
 					}
80 80
 					if (!is_int($key) || ListCommand::class === get_class($this)) {
81 81
 						$value = $this->valueToString($item);
82 82
 						if (!is_null($value)) {
83
-							$output->writeln($prefix . $key . ': ' . $value);
83
+							$output->writeln($prefix.$key.': '.$value);
84 84
 						} else {
85
-							$output->writeln($prefix . $key);
85
+							$output->writeln($prefix.$key);
86 86
 						}
87 87
 					} else {
88
-						$output->writeln($prefix . $this->valueToString($item));
88
+						$output->writeln($prefix.$this->valueToString($item));
89 89
 					}
90 90
 				}
91 91
 				break;
Please login to merge, or discard this patch.
lib/private/Files/Config/MountProviderCollection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function getMountsForUser(IUser $user) {
79 79
 		$loader = $this->loader;
80
-		$mounts = array_map(function (IMountProvider $provider) use ($user, $loader) {
80
+		$mounts = array_map(function(IMountProvider $provider) use ($user, $loader) {
81 81
 			return $provider->getMountsForUser($user, $loader);
82 82
 		}, $this->providers);
83
-		$mounts = array_filter($mounts, function ($result) {
83
+		$mounts = array_filter($mounts, function($result) {
84 84
 			return is_array($result);
85 85
 		});
86
-		$mounts = array_reduce($mounts, function (array $mounts, array $providerMounts) {
86
+		$mounts = array_reduce($mounts, function(array $mounts, array $providerMounts) {
87 87
 			return array_merge($mounts, $providerMounts);
88 88
 		}, array());
89 89
 		return $this->filterMounts($user, $mounts);
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 		// shared mount provider gets to go last since it needs to know existing files
94 94
 		// to check for name collisions
95 95
 		$firstMounts = [];
96
-		$firstProviders = array_filter($this->providers, function (IMountProvider $provider) {
96
+		$firstProviders = array_filter($this->providers, function(IMountProvider $provider) {
97 97
 			return (get_class($provider) !== 'OCA\Files_Sharing\MountProvider');
98 98
 		});
99
-		$lastProviders = array_filter($this->providers, function (IMountProvider $provider) {
99
+		$lastProviders = array_filter($this->providers, function(IMountProvider $provider) {
100 100
 			return (get_class($provider) === 'OCA\Files_Sharing\MountProvider');
101 101
 		});
102 102
 		foreach ($firstProviders as $provider) {
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 		$providers = array_reverse($this->homeProviders); // call the latest registered provider first to give apps an opportunity to overwrite builtin
135 135
 		foreach ($providers as $homeProvider) {
136 136
 			if ($mount = $homeProvider->getHomeMountForUser($user, $this->loader)) {
137
-				$mount->setMountPoint('/' . $user->getUID()); //make sure the mountpoint is what we expect
137
+				$mount->setMountPoint('/'.$user->getUID()); //make sure the mountpoint is what we expect
138 138
 				return $mount;
139 139
 			}
140 140
 		}
141
-		throw new \Exception('No home storage configured for user ' . $user);
141
+		throw new \Exception('No home storage configured for user '.$user);
142 142
 	}
143 143
 
144 144
 	/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	}
158 158
 
159 159
 	private function filterMounts(IUser $user, array $mountPoints) {
160
-		return array_filter($mountPoints, function (IMountPoint $mountPoint) use ($user) {
160
+		return array_filter($mountPoints, function(IMountPoint $mountPoint) use ($user) {
161 161
 			foreach ($this->mountFilters as $filter) {
162 162
 				if ($filter($mountPoint, $user) === false) {
163 163
 					return false;
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		// for backward compatibility make sure that the remote url stored in the
173 173
 		// database ends with a trailing slash
174 174
 		if (substr($remote, -1) !== '/') {
175
-			$remote = $remote . '/';
175
+			$remote = $remote.'/';
176 176
 		}
177 177
 
178 178
 		$token = $share->getShareSecret();
@@ -200,23 +200,23 @@  discard block
 block discarded – undo
200 200
 
201 201
 			// FIXME this should be a method in the user management instead
202 202
 			if ($shareType === Share::SHARE_TYPE_USER) {
203
-				$this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']);
203
+				$this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']);
204 204
 				Util::emitHook(
205 205
 					'\OCA\Files_Sharing\API\Server2Server',
206 206
 					'preLoginNameUsedAsUserName',
207 207
 					array('uid' => &$shareWith)
208 208
 				);
209
-				$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
209
+				$this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']);
210 210
 
211 211
 				if (!$this->userManager->userExists($shareWith)) {
212
-					throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST);
212
+					throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST);
213 213
 				}
214 214
 
215 215
 				\OC_Util::setupFS($shareWith);
216 216
 			}
217 217
 
218 218
 			if ($shareType === Share::SHARE_TYPE_GROUP && !$this->groupManager->groupExists($shareWith)) {
219
-				throw new ProviderCouldNotAddShareException('Group does not exists', '',Http::STATUS_BAD_REQUEST);
219
+				throw new ProviderCouldNotAddShareException('Group does not exists', '', Http::STATUS_BAD_REQUEST);
220 220
 			}
221 221
 
222 222
 			$externalManager = new \OCA\Files_Sharing\External\Manager(
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 			);
235 235
 
236 236
 			try {
237
-				$externalManager->addShare($remote, $token, '', $name, $owner, $shareType,false, $shareWith, $remoteId);
237
+				$externalManager->addShare($remote, $token, '', $name, $owner, $shareType, false, $shareWith, $remoteId);
238 238
 				$shareId = \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*share_external');
239 239
 
240 240
 				if ($shareType === Share::SHARE_TYPE_USER) {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 						->setType('remote_share')
244 244
 						->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
245 245
 						->setAffectedUser($shareWith)
246
-						->setObject('remote_share', (int)$shareId, $name);
246
+						->setObject('remote_share', (int) $shareId, $name);
247 247
 					\OC::$server->getActivityManager()->publish($event);
248 248
 					$this->notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
249 249
 				} else {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 							->setType('remote_share')
255 255
 							->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
256 256
 							->setAffectedUser($user->getUID())
257
-							->setObject('remote_share', (int)$shareId, $name);
257
+							->setObject('remote_share', (int) $shareId, $name);
258 258
 						\OC::$server->getActivityManager()->publish($event);
259 259
 						$this->notifyAboutNewShare($user->getUID(), $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
260 260
 					}
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 					'level' => ILogger::ERROR,
267 267
 					'app' => 'files_sharing'
268 268
 				]);
269
-				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
269
+				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
270 270
 			}
271 271
 		}
272 272
 
@@ -343,12 +343,12 @@  discard block
 block discarded – undo
343 343
 
344 344
 		$declineAction = $notification->createAction();
345 345
 		$declineAction->setLabel('decline')
346
-			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE');
346
+			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE');
347 347
 		$notification->addAction($declineAction);
348 348
 
349 349
 		$acceptAction = $notification->createAction();
350 350
 		$acceptAction->setLabel('accept')
351
-			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST');
351
+			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST');
352 352
 		$notification->addAction($acceptAction);
353 353
 
354 354
 		$this->notificationManager->notify($notification);
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	 */
409 409
 	protected function executeAcceptShare(IShare $share) {
410 410
 		try {
411
-			$fileId = (int)$share->getNode()->getId();
411
+			$fileId = (int) $share->getNode()->getId();
412 412
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
413 413
 		} catch (\Exception $e) {
414 414
 			throw new ShareNotFound();
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 		$this->federatedShareProvider->removeShareFromTable($share);
487 487
 
488 488
 		try {
489
-			$fileId = (int)$share->getNode()->getId();
489
+			$fileId = (int) $share->getNode()->getId();
490 490
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
491 491
 		} catch (\Exception $e) {
492 492
 			throw new ShareNotFound();
@@ -581,10 +581,10 @@  discard block
 block discarded – undo
581 581
 			// delete all child in case of a group share
582 582
 			$qb = $this->connection->getQueryBuilder();
583 583
 			$qb->delete('share_external')
584
-				->where($qb->expr()->eq('parent', $qb->createNamedParameter((int)$share['id'])));
584
+				->where($qb->expr()->eq('parent', $qb->createNamedParameter((int) $share['id'])));
585 585
 			$qb->execute();
586 586
 
587
-			if ((int)$share['share_type'] === Share::SHARE_TYPE_USER) {
587
+			if ((int) $share['share_type'] === Share::SHARE_TYPE_USER) {
588 588
 				if ($share['accepted']) {
589 589
 					$path = trim($mountpoint, '/');
590 590
 				} else {
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 				$notification = $this->notificationManager->createNotification();
594 594
 				$notification->setApp('files_sharing')
595 595
 					->setUser($share['user'])
596
-					->setObject('remote_share', (int)$share['id']);
596
+					->setObject('remote_share', (int) $share['id']);
597 597
 				$this->notificationManager->markProcessed($notification);
598 598
 
599 599
 				$event = $this->activityManager->generateEvent();
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 					->setType('remote_share')
602 602
 					->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path])
603 603
 					->setAffectedUser($user)
604
-					->setObject('remote_share', (int)$share['id'], $path);
604
+					->setObject('remote_share', (int) $share['id'], $path);
605 605
 				\OC::$server->getActivityManager()->publish($event);
606 606
 			}
607 607
 		}
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
 			$owner = $share->getShareOwner();
651 651
 			$currentServer = $this->addressHandler->generateRemoteURL();
652 652
 			if ($this->addressHandler->compareAddresses($user, $remote, $owner, $currentServer)) {
653
-				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: ' . $id);
653
+				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: '.$id);
654 654
 			}
655 655
 		} catch (\Exception $e) {
656 656
 			throw new ProviderCouldNotAddShareException($e->getMessage());
@@ -664,10 +664,10 @@  discard block
 block discarded – undo
664 664
 			$share->setSharedBy($share->getSharedWith());
665 665
 			$share->setSharedWith($shareWith);
666 666
 			$result = $this->federatedShareProvider->create($share);
667
-			$this->federatedShareProvider->storeRemoteId((int)$result->getId(), $senderId);
667
+			$this->federatedShareProvider->storeRemoteId((int) $result->getId(), $senderId);
668 668
 			return ['token' => $result->getToken(), 'providerId' => $result->getId()];
669 669
 		} else {
670
-			throw new ProviderCouldNotAddShareException('resharing not allowed for share: ' . $id);
670
+			throw new ProviderCouldNotAddShareException('resharing not allowed for share: '.$id);
671 671
 		}
672 672
 
673 673
 	}
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 	 */
714 714
 	protected function ocmPermissions2ncPermissions(array $ocmPermissions) {
715 715
 		$ncPermissions = 0;
716
-		foreach($ocmPermissions as $permission) {
716
+		foreach ($ocmPermissions as $permission) {
717 717
 			switch (strtolower($permission)) {
718 718
 				case 'read':
719 719
 					$ncPermissions += Constants::PERMISSION_READ;
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1005Date20180530124431.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 		$schema = $schemaClosure();
42 42
 
43 43
 		$types = ['resources', 'rooms'];
44
-		foreach($types as $type) {
45
-			if (!$schema->hasTable('calendar_' . $type)) {
46
-				$table = $schema->createTable('calendar_' . $type);
44
+		foreach ($types as $type) {
45
+			if (!$schema->hasTable('calendar_'.$type)) {
46
+				$table = $schema->createTable('calendar_'.$type);
47 47
 
48 48
 				$table->addColumn('id', Type::BIGINT, [
49 49
 					'autoincrement' => true,
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 				]);
74 74
 
75 75
 				$table->setPrimaryKey(['id']);
76
-				$table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc');
77
-				$table->addIndex(['email'], 'calendar_' . $type . '_email');
78
-				$table->addIndex(['displayname'], 'calendar_' . $type . '_name');
76
+				$table->addIndex(['backend_id', 'resource_id'], 'calendar_'.$type.'_bkdrsc');
77
+				$table->addIndex(['email'], 'calendar_'.$type.'_email');
78
+				$table->addIndex(['displayname'], 'calendar_'.$type.'_name');
79 79
 			}
80 80
 		}
81 81
 
Please login to merge, or discard this patch.