Passed
Push — master ( 1ad063...0f7fb7 )
by Morris
22:31 queued 11:17
created
apps/dav/lib/CalDAV/CalendarHome.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 			}
109 109
 		}
110 110
 
111
-		throw new NotFound('Node with name \'' . $name . '\' could not be found');
111
+		throw new NotFound('Node with name \''.$name.'\' could not be found');
112 112
 	}
113 113
 
114 114
 	/**
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/StorageConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 				if (isset($parameters[$key])) {
221 221
 					switch ($parameters[$key]->getType()) {
222 222
 						case \OCA\Files_External\Lib\DefinitionParameter::VALUE_BOOLEAN:
223
-							$value = (bool)$value;
223
+							$value = (bool) $value;
224 224
 							break;
225 225
 					}
226 226
 					$backendOptions[$key] = $value;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 			$result['statusMessage'] = $this->statusMessage;
427 427
 		}
428 428
 		$result['userProvided'] = $this->authMechanism instanceof IUserProvided;
429
-		$result['type'] = ($this->getType() === self::MOUNT_TYPE_PERSONAl) ? 'personal': 'system';
429
+		$result['type'] = ($this->getType() === self::MOUNT_TYPE_PERSONAl) ? 'personal' : 'system';
430 430
 		return $result;
431 431
 	}
432 432
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Helper.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
 		$result = [];
45 45
 		$timestamp = null;
46 46
 
47
-		$view = new \OC\Files\View('/' . $user . '/files_trashbin/files');
47
+		$view = new \OC\Files\View('/'.$user.'/files_trashbin/files');
48 48
 
49 49
 		if (ltrim($dir, '/') !== '' && !$view->is_dir($dir)) {
50 50
 			throw new \Exception('Directory does not exists');
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
 			];
92 92
 			if ($originalPath) {
93 93
 				if ($originalPath !== '.') {
94
-					$i['extraData'] = $originalPath . '/' . $originalName;
94
+					$i['extraData'] = $originalPath.'/'.$originalName;
95 95
 				} else {
96 96
 					$i['extraData'] = $originalName;
97 97
 				}
98 98
 			}
99
-			$result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount);
99
+			$result[] = new FileInfo($absoluteDir.'/'.$i['name'], $storage, $internalPath.'/'.$i['name'], $i, $mount);
100 100
 		}
101 101
 
102 102
 		if ($sortAttribute !== '') {
Please login to merge, or discard this patch.
apps/encryption/lib/Crypto/DecryptAll.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 				if ($useLoginPassword) {
100 100
 					$question = new Question('Please enter the user\'s login password: ');
101 101
 				} elseif ($this->util->isRecoveryEnabledForUser($user) === false) {
102
-					$output->writeln('No recovery key available for user ' . $user);
102
+					$output->writeln('No recovery key available for user '.$user);
103 103
 					return false;
104 104
 				} else {
105 105
 					$user = $recoveryKeyId;
Please login to merge, or discard this patch.
core/ajax/update.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 // need to send an initial message to force-init the event source,
48 48
 // which will then trigger its own CSRF check and produces its own CSRF error
49 49
 // message
50
-$eventSource->send('success', (string)$l->t('Preparing update'));
50
+$eventSource->send('success', (string) $l->t('Preparing update'));
51 51
 
52 52
 class FeedBackHandler {
53 53
 	/** @var integer */
@@ -83,23 +83,23 @@  discard block
 block discarded – undo
83 83
 				if (empty($desc)) {
84 84
 					$desc = $this->currentStep;
85 85
 				}
86
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
86
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
87 87
 				break;
88 88
 			case '\OC\Repair::finishProgress':
89 89
 				$this->progressStateMax = $this->progressStateStep;
90
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
90
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
91 91
 				break;
92 92
 			case '\OC\Repair::step':
93
-				$this->eventSource->send('success', (string)$this->l10n->t('Repair step:') . ' ' . $event->getArgument(0));
93
+				$this->eventSource->send('success', (string) $this->l10n->t('Repair step:').' '.$event->getArgument(0));
94 94
 				break;
95 95
 			case '\OC\Repair::info':
96
-				$this->eventSource->send('success', (string)$this->l10n->t('Repair info:') . ' ' . $event->getArgument(0));
96
+				$this->eventSource->send('success', (string) $this->l10n->t('Repair info:').' '.$event->getArgument(0));
97 97
 				break;
98 98
 			case '\OC\Repair::warning':
99
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair warning:') . ' ' . $event->getArgument(0));
99
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair warning:').' '.$event->getArgument(0));
100 100
 				break;
101 101
 			case '\OC\Repair::error':
102
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair error:') . ' ' . $event->getArgument(0));
102
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair error:').' '.$event->getArgument(0));
103 103
 				break;
104 104
 		}
105 105
 	}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 if (\OCP\Util::needUpgrade()) {
109 109
 	$config = \OC::$server->getSystemConfig();
110 110
 	if ($config->getValue('upgrade.disable-web', false)) {
111
-		$eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
111
+		$eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
112 112
 		$eventSource->close();
113 113
 		exit();
114 114
 	}
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
 	$incompatibleApps = [];
129 129
 
130 130
 	$dispatcher = \OC::$server->getEventDispatcher();
131
-	$dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($eventSource, $l) {
131
+	$dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) {
132 132
 		if ($event instanceof GenericEvent) {
133
-			$eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
133
+			$eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
134 134
 		}
135 135
 	});
136
-	$dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($eventSource, $l) {
136
+	$dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) {
137 137
 		if ($event instanceof GenericEvent) {
138
-			$eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
138
+			$eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
139 139
 		}
140 140
 	});
141 141
 	$feedBack = new FeedBackHandler($eventSource, $l);
@@ -147,67 +147,67 @@  discard block
 block discarded – undo
147 147
 	$dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']);
148 148
 	$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);
149 149
 
150
-	$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
151
-		$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
150
+	$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) {
151
+		$eventSource->send('success', (string) $l->t('Turned on maintenance mode'));
152 152
 	});
153
-	$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
154
-		$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
153
+	$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) {
154
+		$eventSource->send('success', (string) $l->t('Turned off maintenance mode'));
155 155
 	});
156
-	$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
157
-		$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
156
+	$updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) {
157
+		$eventSource->send('success', (string) $l->t('Maintenance mode is kept active'));
158 158
 	});
159
-	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($eventSource, $l) {
160
-		$eventSource->send('success', (string)$l->t('Updating database schema'));
159
+	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use ($eventSource, $l) {
160
+		$eventSource->send('success', (string) $l->t('Updating database schema'));
161 161
 	});
162
-	$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
163
-		$eventSource->send('success', (string)$l->t('Updated database'));
162
+	$updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) {
163
+		$eventSource->send('success', (string) $l->t('Updated database'));
164 164
 	});
165
-	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($eventSource, $l) {
166
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
165
+	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use ($eventSource, $l) {
166
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
167 167
 	});
168
-	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
169
-		$eventSource->send('success', (string)$l->t('Checked database schema update'));
168
+	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) {
169
+		$eventSource->send('success', (string) $l->t('Checked database schema update'));
170 170
 	});
171
-	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
172
-		$eventSource->send('success', (string)$l->t('Checking updates of apps'));
171
+	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) {
172
+		$eventSource->send('success', (string) $l->t('Checking updates of apps'));
173 173
 	});
174
-	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
175
-		$eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app]));
174
+	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use ($eventSource, $l) {
175
+		$eventSource->send('success', (string) $l->t('Checking for update of app "%s" in appstore', [$app]));
176 176
 	});
177
-	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
178
-		$eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app]));
177
+	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use ($eventSource, $l) {
178
+		$eventSource->send('success', (string) $l->t('Update app "%s" from appstore', [$app]));
179 179
 	});
180
-	$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
181
-		$eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app]));
180
+	$updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use ($eventSource, $l) {
181
+		$eventSource->send('success', (string) $l->t('Checked for update of app "%s" in appstore', [$app]));
182 182
 	});
183
-	$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
184
-		$eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
183
+	$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) {
184
+		$eventSource->send('success', (string) $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
185 185
 	});
186
-	$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
187
-		$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
186
+	$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) {
187
+		$eventSource->send('success', (string) $l->t('Checked database schema update for apps'));
188 188
 	});
189
-	$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
190
-		$eventSource->send('success', (string)$l->t('Updated "%1$s" to %2$s', [$app, $version]));
189
+	$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) {
190
+		$eventSource->send('success', (string) $l->t('Updated "%1$s" to %2$s', [$app, $version]));
191 191
 	});
192
-	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
192
+	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) {
193 193
 		$incompatibleApps[] = $app;
194 194
 	});
195
-	$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
195
+	$updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) {
196 196
 		$eventSource->send('failure', $message);
197 197
 		$eventSource->close();
198 198
 		$config->setSystemValue('maintenance', false);
199 199
 	});
200
-	$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
201
-		$eventSource->send('success', (string)$l->t('Set log level to debug'));
200
+	$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use ($eventSource, $l) {
201
+		$eventSource->send('success', (string) $l->t('Set log level to debug'));
202 202
 	});
203
-	$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
204
-		$eventSource->send('success', (string)$l->t('Reset log level'));
203
+	$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use ($eventSource, $l) {
204
+		$eventSource->send('success', (string) $l->t('Reset log level'));
205 205
 	});
206
-	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($eventSource, $l) {
207
-		$eventSource->send('success', (string)$l->t('Starting code integrity check'));
206
+	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use ($eventSource, $l) {
207
+		$eventSource->send('success', (string) $l->t('Starting code integrity check'));
208 208
 	});
209
-	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($eventSource, $l) {
210
-		$eventSource->send('success', (string)$l->t('Finished code integrity check'));
209
+	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use ($eventSource, $l) {
210
+		$eventSource->send('success', (string) $l->t('Finished code integrity check'));
211 211
 	});
212 212
 
213 213
 	try {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			'level' => ILogger::ERROR,
218 218
 			'app' => 'update',
219 219
 		]);
220
-		$eventSource->send('failure', get_class($e) . ': ' . $e->getMessage());
220
+		$eventSource->send('failure', get_class($e).': '.$e->getMessage());
221 221
 		$eventSource->close();
222 222
 		exit();
223 223
 	}
@@ -229,10 +229,10 @@  discard block
 block discarded – undo
229 229
 
230 230
 	if (!empty($disabledApps)) {
231 231
 		$eventSource->send('notice',
232
-			(string)$l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
232
+			(string) $l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
233 233
 	}
234 234
 } else {
235
-	$eventSource->send('notice', (string)$l->t('Already up to date'));
235
+	$eventSource->send('notice', (string) $l->t('Already up to date'));
236 236
 }
237 237
 
238 238
 $eventSource->send('done', '');
Please login to merge, or discard this patch.
core/Controller/LostController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 			$this->sendEmail($user);
268 268
 		} catch (ResetPasswordException $e) {
269 269
 			// Ignore the error since we do not want to leak this info
270
-			$this->logger->warning('Could not send password reset email: ' . $e->getMessage());
270
+			$this->logger->warning('Could not send password reset email: '.$e->getMessage());
271 271
 		} catch (\Exception $e) {
272 272
 			$this->logger->logException($e);
273 273
 		}
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 		$email = $user->getEMailAddress();
338 338
 
339 339
 		if (empty($email)) {
340
-			throw new ResetPasswordException('Could not send reset e-mail since there is no email for username ' . $input);
340
+			throw new ResetPasswordException('Could not send reset e-mail since there is no email for username '.$input);
341 341
 		}
342 342
 
343 343
 		// Generate the token. It is stored encrypted in the database with the
@@ -350,8 +350,8 @@  discard block
 block discarded – undo
350 350
 			ISecureRandom::CHAR_LOWER.
351 351
 			ISecureRandom::CHAR_UPPER
352 352
 		);
353
-		$tokenValue = $this->timeFactory->getTime() .':'. $token;
354
-		$encryptedValue = $this->crypto->encrypt($tokenValue, $email . $this->config->getSystemValue('secret'));
353
+		$tokenValue = $this->timeFactory->getTime().':'.$token;
354
+		$encryptedValue = $this->crypto->encrypt($tokenValue, $email.$this->config->getSystemValue('secret'));
355 355
 		$this->config->setUserValue($user->getUID(), 'core', 'lostpassword', $encryptedValue);
356 356
 
357 357
 		$link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', ['userId' => $user->getUID(), 'token' => $token]);
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 			return $user;
404 404
 		}
405 405
 
406
-		$users = array_filter($this->userManager->getByEmail($input), function (IUser $user) {
406
+		$users = array_filter($this->userManager->getByEmail($input), function(IUser $user) {
407 407
 			return $user->isEnabled();
408 408
 		});
409 409
 
Please login to merge, or discard this patch.
core/Controller/SetupController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 		if ($installRecommended) {
124 124
 			$urlGenerator = \OC::$server->getURLGenerator();
125 125
 			$location = $urlGenerator->getAbsoluteURL('index.php/core/apps/recommended');
126
-			header('Location: ' . $location);
126
+			header('Location: '.$location);
127 127
 			exit();
128 128
 		}
129 129
 		\OC_Util::redirectToDefaultPage();
Please login to merge, or discard this patch.
core/Controller/AvatarController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			$response = new FileDisplayResponse(
128 128
 				$avatarFile,
129 129
 				Http::STATUS_OK,
130
-				['Content-Type' => $avatarFile->getMimeType(), 'X-NC-IsCustomAvatar' => (int)$avatar->isCustomAvatar()]
130
+				['Content-Type' => $avatarFile->getMimeType(), 'X-NC-IsCustomAvatar' => (int) $avatar->isCustomAvatar()]
131 131
 			);
132 132
 		} catch (\Exception $e) {
133 133
 			return new JSONResponse([], Http::STATUS_NOT_FOUND);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 				Http::STATUS_OK,
276 276
 				['Content-Type' => $image->mimeType()]);
277 277
 
278
-		$resp->setETag((string)crc32($image->data()));
278
+		$resp->setETag((string) crc32($image->data()));
279 279
 		$resp->cacheFor(0);
280 280
 		$resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT')));
281 281
 		return $resp;
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
 		$image = new \OC_Image();
310 310
 		$image->loadFromData($tmpAvatar);
311
-		$image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h']));
311
+		$image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h']));
312 312
 		try {
313 313
 			$avatar = $this->avatarManager->getAvatar($this->userId);
314 314
 			$avatar->set($image);
Please login to merge, or discard this patch.
core/Command/L10n/CreateJs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
 		$jsTrans = [];
107 107
 		foreach ($translations as $id => $val) {
108 108
 			if (is_array($val)) {
109
-				$val = '[ ' . implode(',', $val) . ']';
109
+				$val = '[ '.implode(',', $val).']';
110 110
 			}
111 111
 			$jsTrans[] = "\"$id\" : \"$val\"";
112 112
 		}
Please login to merge, or discard this patch.