Passed
Push — master ( 645109...008e6d )
by Christoph
12:14 queued 12s
created
apps/theming/lib/Controller/IconController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function getThemedIcon(string $app, string $image): Response {
92 92
 		try {
93
-			$iconFile = $this->imageManager->getCachedImage('icon-' . $app . '-' . str_replace('/', '_',$image));
93
+			$iconFile = $this->imageManager->getCachedImage('icon-'.$app.'-'.str_replace('/', '_', $image));
94 94
 		} catch (NotFoundException $exception) {
95 95
 			$icon = $this->iconBuilder->colorSvg($app, $image);
96 96
 			if ($icon === false || $icon === '') {
97 97
 				return new NotFoundResponse();
98 98
 			}
99
-			$iconFile = $this->imageManager->setCachedImage('icon-' . $app . '-' . str_replace('/', '_',$image), $icon);
99
+			$iconFile = $this->imageManager->setCachedImage('icon-'.$app.'-'.str_replace('/', '_', $image), $icon);
100 100
 		}
101 101
 		if ($iconFile !== false) {
102 102
 			$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/svg+xml']);
@@ -127,17 +127,17 @@  discard block
 block discarded – undo
127 127
 		}
128 128
 		if ($iconFile === null && $this->imageManager->shouldReplaceIcons()) {
129 129
 			try {
130
-				$iconFile = $this->imageManager->getCachedImage('favIcon-' . $app);
130
+				$iconFile = $this->imageManager->getCachedImage('favIcon-'.$app);
131 131
 			} catch (NotFoundException $exception) {
132 132
 				$icon = $this->iconBuilder->getFavicon($app);
133
-				$iconFile = $this->imageManager->setCachedImage('favIcon-' . $app, $icon);
133
+				$iconFile = $this->imageManager->setCachedImage('favIcon-'.$app, $icon);
134 134
 			}
135 135
 			if ($iconFile !== false) {
136 136
 				$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/x-icon']);
137 137
 			}
138 138
 		}
139
-		if($response === null) {
140
-			$fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon.png';
139
+		if ($response === null) {
140
+			$fallbackLogo = \OC::$SERVERROOT.'/core/img/favicon.png';
141 141
 			$response = new DataDisplayResponse($this->fileAccessHelper->file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/x-icon']);
142 142
 		}
143 143
 		$response->cacheFor(86400);
@@ -163,17 +163,17 @@  discard block
 block discarded – undo
163 163
 		}
164 164
 		if ($this->imageManager->shouldReplaceIcons()) {
165 165
 			try {
166
-				$iconFile = $this->imageManager->getCachedImage('touchIcon-' . $app);
166
+				$iconFile = $this->imageManager->getCachedImage('touchIcon-'.$app);
167 167
 			} catch (NotFoundException $exception) {
168 168
 				$icon = $this->iconBuilder->getTouchIcon($app);
169
-				$iconFile = $this->imageManager->setCachedImage('touchIcon-' . $app, $icon);
169
+				$iconFile = $this->imageManager->setCachedImage('touchIcon-'.$app, $icon);
170 170
 			}
171 171
 			if ($iconFile !== false) {
172 172
 				$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/png']);
173 173
 			}
174 174
 		}
175
-		if($response === null) {
176
-			$fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon-touch.png';
175
+		if ($response === null) {
176
+			$fallbackLogo = \OC::$SERVERROOT.'/core/img/favicon-touch.png';
177 177
 			$response = new DataDisplayResponse($this->fileAccessHelper->file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/png']);
178 178
 		}
179 179
 		$response->cacheFor(86400);
Please login to merge, or discard this patch.
apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 * @throws ShareNotFound
95 95
 	 */
96 96
 	public function beforeController($controller, $methodName) {
97
-		if(!$this->isSharingEnabled()) {
97
+		if (!$this->isSharingEnabled()) {
98 98
 			throw new NotFoundException('Sharing is disabled.');
99 99
 		}
100 100
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * @throws \Exception
115 115
 	 */
116 116
 	public function afterException($controller, $methodName, \Exception $exception) {
117
-		if(is_a($exception, NotFoundException::class)) {
117
+		if (is_a($exception, NotFoundException::class)) {
118 118
 			return new NotFoundResponse();
119 119
 		}
120 120
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	private function isSharingEnabled() {
152 152
 		// FIXME: This check is done here since the route is globally defined and not inside the files_sharing app
153 153
 		// Check whether the sharing application is enabled
154
-		if(!$this->appManager->isEnabledForUser($this->appName)) {
154
+		if (!$this->appManager->isEnabledForUser($this->appName)) {
155 155
 			return false;
156 156
 		}
157 157
 
Please login to merge, or discard this patch.
lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 		}
84 84
 
85 85
 		// Check whether public sharing is enabled
86
-		if($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
86
+		if ($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
87 87
 			return false;
88 88
 		}
89 89
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/RequestHandlerController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		$owner = isset($_POST['owner']) ? $_POST['owner'] : null;
146 146
 		$sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null;
147 147
 		$shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null;
148
-		$remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null;
148
+		$remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null;
149 149
 		$sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null;
150 150
 		$ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null;
151 151
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		} catch (ProviderCouldNotAddShareException $e) {
181 181
 			throw new OCSException($e->getMessage(), 400);
182 182
 		} catch (\Exception $e) {
183
-			throw new OCSException('internal server error, was not able to add share from ' . $remote, 500);
183
+			throw new OCSException('internal server error, was not able to add share from '.$remote, 500);
184 184
 		}
185 185
 
186 186
 		return new Http\DataResponse();
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 
203 203
 		$token = $this->request->getParam('token', null);
204 204
 		$shareWith = $this->request->getParam('shareWith', null);
205
-		$permission = (int)$this->request->getParam('permission', null);
206
-		$remoteId = (int)$this->request->getParam('remoteId', null);
205
+		$permission = (int) $this->request->getParam('permission', null);
206
+		$remoteId = (int) $this->request->getParam('remoteId', null);
207 207
 
208 208
 		if ($id === null ||
209 209
 			$token === null ||
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 		} catch (ProviderDoesNotExistsException $e) {
232 232
 			throw new OCSException('Server does not support federated cloud sharing', 503);
233 233
 		} catch (ShareNotFound $e) {
234
-			$this->logger->debug('Share not found: ' . $e->getMessage());
234
+			$this->logger->debug('Share not found: '.$e->getMessage());
235 235
 		} catch (\Exception $e) {
236
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
236
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
237 237
 		}
238 238
 
239 239
 		throw new OCSBadRequestException();
@@ -267,9 +267,9 @@  discard block
 block discarded – undo
267 267
 		} catch (ProviderDoesNotExistsException $e) {
268 268
 			throw new OCSException('Server does not support federated cloud sharing', 503);
269 269
 		} catch (ShareNotFound $e) {
270
-			$this->logger->debug('Share not found: ' . $e->getMessage());
270
+			$this->logger->debug('Share not found: '.$e->getMessage());
271 271
 		} catch (\Exception $e) {
272
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
272
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
273 273
 		}
274 274
 
275 275
 		return new Http\DataResponse();
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 		} catch (ProviderDoesNotExistsException $e) {
301 301
 			throw new OCSException('Server does not support federated cloud sharing', 503);
302 302
 		} catch (ShareNotFound $e) {
303
-			$this->logger->debug('Share not found: ' . $e->getMessage());
303
+			$this->logger->debug('Share not found: '.$e->getMessage());
304 304
 		} catch (\Exception $e) {
305
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
305
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
306 306
 		}
307 307
 
308 308
 		return new Http\DataResponse();
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 			$notification = ['sharedSecret' => $token];
332 332
 			$provider->notificationReceived('SHARE_UNSHARED', $id, $notification);
333 333
 		} catch (\Exception $e) {
334
-			$this->logger->debug('processing unshare notification failed: ' . $e->getMessage());
334
+			$this->logger->debug('processing unshare notification failed: '.$e->getMessage());
335 335
 		}
336 336
 
337 337
 		return new Http\DataResponse();
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
 		try {
406 406
 			$provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file');
407
-			$ocmPermissions = $this->ncPermissions2ocmPermissions((int)$ncPermissions);
407
+			$ocmPermissions = $this->ncPermissions2ocmPermissions((int) $ncPermissions);
408 408
 			$notification = ['sharedSecret' => $token, 'permission' => $ocmPermissions];
409 409
 			$provider->notificationReceived('RESHARE_CHANGE_PERMISSION', $id, $notification);
410 410
 		} catch (\Exception $e) {
Please login to merge, or discard this patch.
core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 */
45 45
 	public function run($arguments) {
46
-		$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
46
+		$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
47 47
 		$instanceId = $this->config->getSystemValue('instanceid', null);
48 48
 
49
-		if(!is_string($instanceId) || empty($instanceId)) {
49
+		if (!is_string($instanceId) || empty($instanceId)) {
50 50
 			return;
51 51
 		}
52 52
 
53
-		$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
54
-		$backupFolderPath = $updaterFolderPath . '/backups';
55
-		if(file_exists($backupFolderPath)) {
53
+		$updaterFolderPath = $dataDir.'/updater-'.$instanceId;
54
+		$backupFolderPath = $updaterFolderPath.'/backups';
55
+		if (file_exists($backupFolderPath)) {
56 56
 			$this->log->info("$backupFolderPath exists - start to clean it up");
57 57
 
58 58
 			$dirList = [];
59 59
 			$dirs = new \DirectoryIterator($backupFolderPath);
60
-			foreach($dirs as $dir) {
60
+			foreach ($dirs as $dir) {
61 61
 				// skip files and dot dirs
62 62
 				if ($dir->isFile() || $dir->isDot()) {
63 63
 					continue;
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 			ksort($dirList);
77 77
 			// drop the newest 3 directories
78 78
 			$dirList = array_slice($dirList, 0, -3);
79
-			$this->log->info("List of all directories that will be deleted: " . json_encode($dirList));
79
+			$this->log->info("List of all directories that will be deleted: ".json_encode($dirList));
80 80
 
81
-			foreach($dirList as $dir) {
81
+			foreach ($dirList as $dir) {
82 82
 				$this->log->info("Removing $dir ...");
83 83
 				\OC_Helper::rmdirr($dir);
84 84
 			}
Please login to merge, or discard this patch.
lib/private/Authentication/Token/PublicKeyToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 		if (is_array($scope)) {
185 185
 			parent::setScope(json_encode($scope));
186 186
 		} else {
187
-			parent::setScope((string)$scope);
187
+			parent::setScope((string) $scope);
188 188
 		}
189 189
 	}
190 190
 
Please login to merge, or discard this patch.
apps/dav/lib/Controller/InvitationResponseController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$stmt = $query->execute();
168 168
 		$row = $stmt->fetch(\PDO::FETCH_ASSOC);
169 169
 
170
-		if(!$row) {
170
+		if (!$row) {
171 171
 			return null;
172 172
 		}
173 173
 
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 	 * @param string|null $comment
187 187
 	 * @return Message
188 188
 	 */
189
-	private function buildITipResponse(array $row, string $partStat, int $guests=null,
190
-									   string $comment=null):Message {
189
+	private function buildITipResponse(array $row, string $partStat, int $guests = null,
190
+									   string $comment = null):Message {
191 191
 		$iTipMessage = new Message();
192 192
 		$iTipMessage->uid = $row['uid'];
193 193
 		$iTipMessage->component = 'VEVENT';
Please login to merge, or discard this patch.
apps/dav/templates/schedule-response-options.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 			<input type="text" name="comment" placeholder="Comment" />
30 30
 		</fieldset>
31 31
 		<fieldset>
32
-			<input type="submit" value="<?php p($l->t('Save'));?>">
32
+			<input type="submit" value="<?php p($l->t('Save')); ?>">
33 33
 		</fieldset>
34 34
 	</form>
35 35
 </div>
Please login to merge, or discard this patch.
apps/dav/templates/schedule-response-error.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <div class="update">
2
-	<p class="message"><?php p($l->t('There was an error updating your attendance status.'));?></p>
3
-	<p class="message"><?php p($l->t('Please contact the organizer directly.'));?></p>
4
-	<?php if(isset($_['organizer'])): ?>
2
+	<p class="message"><?php p($l->t('There was an error updating your attendance status.')); ?></p>
3
+	<p class="message"><?php p($l->t('Please contact the organizer directly.')); ?></p>
4
+	<?php if (isset($_['organizer'])): ?>
5 5
 		<p class="message"><a href="<?php p($_['organizer']) ?>"><?php p(substr($_['organizer'], 7)) ?></a></p>
6 6
 	<?php endif; ?>
7 7
 </div>
Please login to merge, or discard this patch.