Passed
Push — master ( d96e2c...35e3d4 )
by Morris
24:18 queued 10:44
created
core/Command/Upgrade.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	protected function execute(InputInterface $input, OutputInterface $output) {
90 90
 
91
-		if(Util::needUpgrade()) {
91
+		if (Util::needUpgrade()) {
92 92
 			if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
93 93
 				// Prepend each line with a little timestamp
94 94
 				$timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter());
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 				if ($event instanceof GenericEvent) {
111 111
 					$message = $event->getSubject();
112 112
 					if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
113
-						$output->writeln(' Checking table ' . $message);
113
+						$output->writeln(' Checking table '.$message);
114 114
 					} else {
115 115
 						if (strlen($message) > 60) {
116
-							$message = substr($message, 0, 57) . '...';
116
+							$message = substr($message, 0, 57).'...';
117 117
 						}
118 118
 						$progress->setMessage($message);
119 119
 						if ($event[0] === 1) {
@@ -154,20 +154,20 @@  discard block
 block discarded – undo
154 154
 						$output->writeln('');
155 155
 						break;
156 156
 					case '\OC\Repair::step':
157
-						if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
158
-							$output->writeln('<info>Repair step: ' . $event->getArgument(0) . '</info>');
157
+						if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
158
+							$output->writeln('<info>Repair step: '.$event->getArgument(0).'</info>');
159 159
 						}
160 160
 						break;
161 161
 					case '\OC\Repair::info':
162
-						if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
163
-							$output->writeln('<info>Repair info: ' . $event->getArgument(0) . '</info>');
162
+						if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
163
+							$output->writeln('<info>Repair info: '.$event->getArgument(0).'</info>');
164 164
 						}
165 165
 						break;
166 166
 					case '\OC\Repair::warning':
167
-						$output->writeln('<error>Repair warning: ' . $event->getArgument(0) . '</error>');
167
+						$output->writeln('<error>Repair warning: '.$event->getArgument(0).'</error>');
168 168
 						break;
169 169
 					case '\OC\Repair::error':
170
-						$output->writeln('<error>Repair error: ' . $event->getArgument(0) . '</error>');
170
+						$output->writeln('<error>Repair error: '.$event->getArgument(0).'</error>');
171 171
 						break;
172 172
 				}
173 173
 			};
@@ -183,17 +183,17 @@  discard block
 block discarded – undo
183 183
 			$dispatcher->addListener('\OC\Repair::error', $repairListener);
184 184
 			
185 185
 
186
-			$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) {
186
+			$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use($output) {
187 187
 				$output->writeln('<info>Turned on maintenance mode</info>');
188 188
 			});
189
-			$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) {
189
+			$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use($output) {
190 190
 				$output->writeln('<info>Turned off maintenance mode</info>');
191 191
 			});
192
-			$updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) {
192
+			$updater->listen('\OC\Updater', 'maintenanceActive', function() use($output) {
193 193
 				$output->writeln('<info>Maintenance mode is kept active</info>');
194 194
 			});
195 195
 			$updater->listen('\OC\Updater', 'updateEnd',
196
-				function ($success) use($output, $self) {
196
+				function($success) use($output, $self) {
197 197
 					if ($success) {
198 198
 						$message = "<info>Update successful</info>";
199 199
 					} else {
@@ -201,58 +201,58 @@  discard block
 block discarded – undo
201 201
 					}
202 202
 					$output->writeln($message);
203 203
 				});
204
-			$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) {
204
+			$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($output) {
205 205
 				$output->writeln('<info>Updating database schema</info>');
206 206
 			});
207
-			$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {
207
+			$updater->listen('\OC\Updater', 'dbUpgrade', function() use($output) {
208 208
 				$output->writeln('<info>Updated database</info>');
209 209
 			});
210
-			$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) {
210
+			$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($output) {
211 211
 				$output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>');
212 212
 			});
213
-			$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) {
213
+			$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($output) {
214 214
 				$output->writeln('<info>Checked database schema update</info>');
215 215
 			});
216
-			$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) {
217
-				$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>');
216
+			$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($output) {
217
+				$output->writeln('<comment>Disabled incompatible app: '.$app.'</comment>');
218 218
 			});
219
-			$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) {
220
-				$output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>');
219
+			$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($output) {
220
+				$output->writeln('<info>Checking for update of app '.$app.' in appstore</info>');
221 221
 			});
222
-			$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) {
223
-				$output->writeln('<info>Update app ' . $app . ' from appstore</info>');
222
+			$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($output) {
223
+				$output->writeln('<info>Update app '.$app.' from appstore</info>');
224 224
 			});
225
-			$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) {
226
-				$output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>');
225
+			$updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($output) {
226
+				$output->writeln('<info>Checked for update of app "'.$app.'" in appstore </info>');
227 227
 			});
228
-			$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) {
228
+			$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($output) {
229 229
 				$output->writeln('<info>Checking updates of apps</info>');
230 230
 			});
231
-			$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) {
231
+			$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($output) {
232 232
 				$output->writeln("<info>Checking whether the database schema for <$app> can be updated (this can take a long time depending on the database size)</info>");
233 233
 			});
234
-			$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) {
234
+			$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($output) {
235 235
 				$output->writeln('<info>Checked database schema update for apps</info>');
236 236
 			});
237
-			$updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) {
237
+			$updater->listen('\OC\Updater', 'appUpgradeStarted', function($app, $version) use ($output) {
238 238
 				$output->writeln("<info>Updating <$app> ...</info>");
239 239
 			});
240
-			$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) {
240
+			$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($output) {
241 241
 				$output->writeln("<info>Updated <$app> to $version</info>");
242 242
 			});
243
-			$updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) {
243
+			$updater->listen('\OC\Updater', 'failure', function($message) use($output, $self) {
244 244
 				$output->writeln("<error>$message</error>");
245 245
 			});
246
-			$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) {
246
+			$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($output) {
247 247
 				$output->writeln("<info>Set log level to debug</info>");
248 248
 			});
249
-			$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) {
249
+			$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($output) {
250 250
 				$output->writeln("<info>Reset log level</info>");
251 251
 			});
252
-			$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) {
252
+			$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($output) {
253 253
 				$output->writeln("<info>Starting code integrity check...</info>");
254 254
 			});
255
-			$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) {
255
+			$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($output) {
256 256
 				$output->writeln("<info>Finished code integrity check</info>");
257 257
 			});
258 258
 
@@ -260,12 +260,12 @@  discard block
 block discarded – undo
260 260
 
261 261
 			$this->postUpgradeCheck($input, $output);
262 262
 
263
-			if(!$success) {
263
+			if (!$success) {
264 264
 				return self::ERROR_FAILURE;
265 265
 			}
266 266
 
267 267
 			return self::ERROR_SUCCESS;
268
-		} else if($this->config->getSystemValue('maintenance', false)) {
268
+		} else if ($this->config->getSystemValue('maintenance', false)) {
269 269
 			//Possible scenario: Nextcloud core is updated but an app failed
270 270
 			$output->writeln('<warning>Nextcloud is in maintenance mode</warning>');
271 271
 			$output->write('<comment>Maybe an upgrade is already in process. Please check the '
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
 		$trustedDomains = $this->config->getSystemValue('trusted_domains', array());
291 291
 		if (empty($trustedDomains)) {
292 292
 			$output->write(
293
-				'<warning>The setting "trusted_domains" could not be ' .
294
-				'set automatically by the upgrade script, ' .
293
+				'<warning>The setting "trusted_domains" could not be '.
294
+				'set automatically by the upgrade script, '.
295 295
 				'please set it manually</warning>'
296 296
 			);
297 297
 		}
Please login to merge, or discard this patch.
lib/private/Updater.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
 		$this->logAllEvents();
102 102
 
103 103
 		$logLevel = $this->config->getSystemValue('loglevel', ILogger::WARN);
104
-		$this->emit('\OC\Updater', 'setDebugLogLevel', [ $logLevel, $this->logLevelNames[$logLevel] ]);
104
+		$this->emit('\OC\Updater', 'setDebugLogLevel', [$logLevel, $this->logLevelNames[$logLevel]]);
105 105
 		$this->config->setSystemValue('loglevel', ILogger::DEBUG);
106 106
 
107 107
 		$wasMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
108 108
 
109
-		if(!$wasMaintenanceModeEnabled) {
109
+		if (!$wasMaintenanceModeEnabled) {
110 110
 			$this->config->setSystemValue('maintenance', true);
111 111
 			$this->emit('\OC\Updater', 'maintenanceEnabled');
112 112
 		}
@@ -115,31 +115,31 @@  discard block
 block discarded – undo
115 115
 
116 116
 		$installedVersion = $this->config->getSystemValue('version', '0.0.0');
117 117
 		$currentVersion = implode('.', \OCP\Util::getVersion());
118
-		$this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core'));
118
+		$this->log->debug('starting upgrade from '.$installedVersion.' to '.$currentVersion, array('app' => 'core'));
119 119
 
120 120
 		$success = true;
121 121
 		try {
122 122
 			$this->doUpgrade($currentVersion, $installedVersion);
123 123
 		} catch (HintException $exception) {
124 124
 			$this->log->logException($exception, ['app' => 'core']);
125
-			$this->emit('\OC\Updater', 'failure', array($exception->getMessage() . ': ' .$exception->getHint()));
125
+			$this->emit('\OC\Updater', 'failure', array($exception->getMessage().': '.$exception->getHint()));
126 126
 			$success = false;
127 127
 		} catch (\Exception $exception) {
128 128
 			$this->log->logException($exception, ['app' => 'core']);
129
-			$this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage()));
129
+			$this->emit('\OC\Updater', 'failure', array(get_class($exception).': '.$exception->getMessage()));
130 130
 			$success = false;
131 131
 		}
132 132
 
133 133
 		$this->emit('\OC\Updater', 'updateEnd', array($success));
134 134
 
135
-		if(!$wasMaintenanceModeEnabled && $success) {
135
+		if (!$wasMaintenanceModeEnabled && $success) {
136 136
 			$this->config->setSystemValue('maintenance', false);
137 137
 			$this->emit('\OC\Updater', 'maintenanceDisabled');
138 138
 		} else {
139 139
 			$this->emit('\OC\Updater', 'maintenanceActive');
140 140
 		}
141 141
 
142
-		$this->emit('\OC\Updater', 'resetLogLevel', [ $logLevel, $this->logLevelNames[$logLevel] ]);
142
+		$this->emit('\OC\Updater', 'resetLogLevel', [$logLevel, $this->logLevelNames[$logLevel]]);
143 143
 		$this->config->setSystemValue('loglevel', $logLevel);
144 144
 		$this->config->setSystemValue('installed', true);
145 145
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 */
154 154
 	private function getAllowedPreviousVersions() {
155 155
 		// this should really be a JSON file
156
-		require \OC::$SERVERROOT . '/version.php';
156
+		require \OC::$SERVERROOT.'/version.php';
157 157
 		/** @var array $OC_VersionCanBeUpgradedFrom */
158 158
 		return $OC_VersionCanBeUpgradedFrom;
159 159
 	}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	private function getVendor() {
167 167
 		// this should really be a JSON file
168
-		require \OC::$SERVERROOT . '/version.php';
168
+		require \OC::$SERVERROOT.'/version.php';
169 169
 		/** @var string $vendor */
170 170
 		return (string) $vendor;
171 171
 	}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function isUpgradePossible($oldVersion, $newVersion, array $allowedPreviousVersions) {
181 181
 		$version = explode('.', $oldVersion);
182
-		$majorMinor = $version[0] . '.' . $version[1];
182
+		$majorMinor = $version[0].'.'.$version[1];
183 183
 
184 184
 		$currentVendor = $this->config->getAppValue('core', 'vendor', '');
185 185
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		// create empty file in data dir, so we can later find
227 227
 		// out that this is indeed an ownCloud data directory
228 228
 		// (in case it didn't exist before)
229
-		file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', '');
229
+		file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
230 230
 
231 231
 		// pre-upgrade repairs
232 232
 		$repair = new Repair(Repair::getBeforeUpgradeRepairSteps(), \OC::$server->getEventDispatcher());
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 		foreach ($errors as $appId => $exception) {
259 259
 			/** @var \Exception $exception */
260 260
 			$this->log->logException($exception, ['app' => $appId]);
261
-			$this->emit('\OC\Updater', 'failure', [$appId . ': ' . $exception->getMessage()]);
261
+			$this->emit('\OC\Updater', 'failure', [$appId.': '.$exception->getMessage()]);
262 262
 		}
263 263
 
264 264
 		// post-upgrade repairs
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		$this->config->setAppValue('core', 'lastupdatedat', 0);
270 270
 
271 271
 		// Check for code integrity if not disabled
272
-		if(\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) {
272
+		if (\OC::$server->getIntegrityCodeChecker()->isCodeCheckEnforced()) {
273 273
 			$this->emit('\OC\Updater', 'startCheckCodeIntegrity');
274 274
 			$this->checker->runInstanceVerification();
275 275
 			$this->emit('\OC\Updater', 'finishedCheckCodeIntegrity');
@@ -310,12 +310,12 @@  discard block
 block discarded – undo
310 310
 				 * @link https://github.com/owncloud/core/issues/10980
311 311
 				 * @see \OC_App::updateApp
312 312
 				 */
313
-				if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/preupdate.php')) {
313
+				if (file_exists(\OC_App::getAppPath($appId).'/appinfo/preupdate.php')) {
314 314
 					$this->includePreUpdate($appId);
315 315
 				}
316
-				if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) {
316
+				if (file_exists(\OC_App::getAppPath($appId).'/appinfo/database.xml')) {
317 317
 					$this->emit('\OC\Updater', 'appSimulateUpdate', array($appId));
318
-					\OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml');
318
+					\OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId).'/appinfo/database.xml');
319 319
 				}
320 320
 			}
321 321
 		}
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	 * @param string $appId
329 329
 	 */
330 330
 	private function includePreUpdate($appId) {
331
-		include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php';
331
+		include \OC_App::getAppPath($appId).'/appinfo/preupdate.php';
332 332
 	}
333 333
 
334 334
 	/**
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 		foreach ($apps as $appId) {
347 347
 			$priorityType = false;
348 348
 			foreach ($priorityTypes as $type) {
349
-				if(!isset($stacks[$type])) {
349
+				if (!isset($stacks[$type])) {
350 350
 					$stacks[$type] = array();
351 351
 				}
352 352
 				if (\OC_App::isType($appId, [$type])) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 					\OC_App::updateApp($appId);
367 367
 					$this->emit('\OC\Updater', 'appUpgrade', [$appId, \OC_App::getAppVersion($appId)]);
368 368
 				}
369
-				if($type !== $pseudoOtherType) {
369
+				if ($type !== $pseudoOtherType) {
370 370
 					// load authentication, filesystem and logging apps after
371 371
 					// upgrading them. Other apps my need to rely on modifying
372 372
 					// user and/or filesystem aspects.
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
 		foreach ($apps as $app) {
395 395
 			// check if the app is compatible with this version of ownCloud
396 396
 			$info = OC_App::getAppInfo($app);
397
-			if($info === null || !OC_App::isAppCompatible($version, $info)) {
397
+			if ($info === null || !OC_App::isAppCompatible($version, $info)) {
398 398
 				if ($appManager->isShipped($app)) {
399
-					throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update');
399
+					throw new \UnexpectedValueException('The files of the app "'.$app.'" were not correctly replaced before running the update');
400 400
 				}
401 401
 				\OC::$server->getAppManager()->disableApp($app);
402 402
 				$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	 * @throws \Exception
436 436
 	 */
437 437
 	private function upgradeAppStoreApps(array $disabledApps, $reenable = false) {
438
-		foreach($disabledApps as $app) {
438
+		foreach ($disabledApps as $app) {
439 439
 			try {
440 440
 				$this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]);
441 441
 				if ($this->installer->isUpdateAvailable($app)) {
@@ -459,22 +459,22 @@  discard block
 block discarded – undo
459 459
 	 */
460 460
 	private function emitRepairEvents() {
461 461
 		$dispatcher = \OC::$server->getEventDispatcher();
462
-		$dispatcher->addListener('\OC\Repair::warning', function ($event) {
462
+		$dispatcher->addListener('\OC\Repair::warning', function($event) {
463 463
 			if ($event instanceof GenericEvent) {
464 464
 				$this->emit('\OC\Updater', 'repairWarning', $event->getArguments());
465 465
 			}
466 466
 		});
467
-		$dispatcher->addListener('\OC\Repair::error', function ($event) {
467
+		$dispatcher->addListener('\OC\Repair::error', function($event) {
468 468
 			if ($event instanceof GenericEvent) {
469 469
 				$this->emit('\OC\Updater', 'repairError', $event->getArguments());
470 470
 			}
471 471
 		});
472
-		$dispatcher->addListener('\OC\Repair::info', function ($event) {
472
+		$dispatcher->addListener('\OC\Repair::info', function($event) {
473 473
 			if ($event instanceof GenericEvent) {
474 474
 				$this->emit('\OC\Updater', 'repairInfo', $event->getArguments());
475 475
 			}
476 476
 		});
477
-		$dispatcher->addListener('\OC\Repair::step', function ($event) {
477
+		$dispatcher->addListener('\OC\Repair::step', function($event) {
478 478
 			if ($event instanceof GenericEvent) {
479 479
 				$this->emit('\OC\Updater', 'repairStep', $event->getArguments());
480 480
 			}
@@ -489,13 +489,13 @@  discard block
 block discarded – undo
489 489
 			if (!$event instanceof GenericEvent) {
490 490
 				return;
491 491
 			}
492
-			$log->info('\OC\DB\Migrator::executeSql: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']);
492
+			$log->info('\OC\DB\Migrator::executeSql: '.$event->getSubject().' ('.$event->getArgument(0).' of '.$event->getArgument(1).')', ['app' => 'updater']);
493 493
 		});
494 494
 		$dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($log) {
495 495
 			if (!$event instanceof GenericEvent) {
496 496
 				return;
497 497
 			}
498
-			$log->info('\OC\DB\Migrator::checkTable: ' . $event->getSubject() . ' (' . $event->getArgument(0) . ' of ' . $event->getArgument(1) . ')', ['app' => 'updater']);
498
+			$log->info('\OC\DB\Migrator::checkTable: '.$event->getSubject().' ('.$event->getArgument(0).' of '.$event->getArgument(1).')', ['app' => 'updater']);
499 499
 		});
500 500
 
501 501
 		$repairListener = function($event) use ($log) {
@@ -504,30 +504,30 @@  discard block
 block discarded – undo
504 504
 			}
505 505
 			switch ($event->getSubject()) {
506 506
 				case '\OC\Repair::startProgress':
507
-					$log->info('\OC\Repair::startProgress: Starting ... ' . $event->getArgument(1) .  ' (' . $event->getArgument(0) . ')', ['app' => 'updater']);
507
+					$log->info('\OC\Repair::startProgress: Starting ... '.$event->getArgument(1).' ('.$event->getArgument(0).')', ['app' => 'updater']);
508 508
 					break;
509 509
 				case '\OC\Repair::advance':
510 510
 					$desc = $event->getArgument(1);
511 511
 					if (empty($desc)) {
512 512
 						$desc = '';
513 513
 					}
514
-					$log->info('\OC\Repair::advance: ' . $desc . ' (' . $event->getArgument(0) . ')', ['app' => 'updater']);
514
+					$log->info('\OC\Repair::advance: '.$desc.' ('.$event->getArgument(0).')', ['app' => 'updater']);
515 515
 
516 516
 					break;
517 517
 				case '\OC\Repair::finishProgress':
518 518
 					$log->info('\OC\Repair::finishProgress', ['app' => 'updater']);
519 519
 					break;
520 520
 				case '\OC\Repair::step':
521
-					$log->info('\OC\Repair::step: Repair step: ' . $event->getArgument(0), ['app' => 'updater']);
521
+					$log->info('\OC\Repair::step: Repair step: '.$event->getArgument(0), ['app' => 'updater']);
522 522
 					break;
523 523
 				case '\OC\Repair::info':
524
-					$log->info('\OC\Repair::info: Repair info: ' . $event->getArgument(0), ['app' => 'updater']);
524
+					$log->info('\OC\Repair::info: Repair info: '.$event->getArgument(0), ['app' => 'updater']);
525 525
 					break;
526 526
 				case '\OC\Repair::warning':
527
-					$log->warning('\OC\Repair::warning: Repair warning: ' . $event->getArgument(0), ['app' => 'updater']);
527
+					$log->warning('\OC\Repair::warning: Repair warning: '.$event->getArgument(0), ['app' => 'updater']);
528 528
 					break;
529 529
 				case '\OC\Repair::error':
530
-					$log->error('\OC\Repair::error: Repair error: ' . $event->getArgument(0), ['app' => 'updater']);
530
+					$log->error('\OC\Repair::error: Repair error: '.$event->getArgument(0), ['app' => 'updater']);
531 531
 					break;
532 532
 			}
533 533
 		};
@@ -541,74 +541,74 @@  discard block
 block discarded – undo
541 541
 		$dispatcher->addListener('\OC\Repair::error', $repairListener);
542 542
 
543 543
 
544
-		$this->listen('\OC\Updater', 'maintenanceEnabled', function () use($log) {
544
+		$this->listen('\OC\Updater', 'maintenanceEnabled', function() use($log) {
545 545
 			$log->info('\OC\Updater::maintenanceEnabled: Turned on maintenance mode', ['app' => 'updater']);
546 546
 		});
547
-		$this->listen('\OC\Updater', 'maintenanceDisabled', function () use($log) {
547
+		$this->listen('\OC\Updater', 'maintenanceDisabled', function() use($log) {
548 548
 			$log->info('\OC\Updater::maintenanceDisabled: Turned off maintenance mode', ['app' => 'updater']);
549 549
 		});
550
-		$this->listen('\OC\Updater', 'maintenanceActive', function () use($log) {
550
+		$this->listen('\OC\Updater', 'maintenanceActive', function() use($log) {
551 551
 			$log->info('\OC\Updater::maintenanceActive: Maintenance mode is kept active', ['app' => 'updater']);
552 552
 		});
553
-		$this->listen('\OC\Updater', 'updateEnd', function ($success) use($log) {
553
+		$this->listen('\OC\Updater', 'updateEnd', function($success) use($log) {
554 554
 			if ($success) {
555 555
 				$log->info('\OC\Updater::updateEnd: Update successful', ['app' => 'updater']);
556 556
 			} else {
557 557
 				$log->error('\OC\Updater::updateEnd: Update failed', ['app' => 'updater']);
558 558
 			}
559 559
 		});
560
-		$this->listen('\OC\Updater', 'dbUpgradeBefore', function () use($log) {
560
+		$this->listen('\OC\Updater', 'dbUpgradeBefore', function() use($log) {
561 561
 			$log->info('\OC\Updater::dbUpgradeBefore: Updating database schema', ['app' => 'updater']);
562 562
 		});
563
-		$this->listen('\OC\Updater', 'dbUpgrade', function () use($log) {
563
+		$this->listen('\OC\Updater', 'dbUpgrade', function() use($log) {
564 564
 			$log->info('\OC\Updater::dbUpgrade: Updated database', ['app' => 'updater']);
565 565
 		});
566
-		$this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($log) {
566
+		$this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($log) {
567 567
 			$log->info('\OC\Updater::dbSimulateUpgradeBefore: Checking whether the database schema can be updated (this can take a long time depending on the database size)', ['app' => 'updater']);
568 568
 		});
569
-		$this->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($log) {
569
+		$this->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($log) {
570 570
 			$log->info('\OC\Updater::dbSimulateUpgrade: Checked database schema update', ['app' => 'updater']);
571 571
 		});
572
-		$this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($log) {
573
-			$log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']);
572
+		$this->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($log) {
573
+			$log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: '.$app, ['app' => 'updater']);
574 574
 		});
575
-		$this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($log) {
576
-			$log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']);
575
+		$this->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($log) {
576
+			$log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "'.$app.'" in appstore', ['app' => 'updater']);
577 577
 		});
578
-		$this->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($log) {
579
-			$log->info('\OC\Updater::upgradeAppStoreApp: Update app "' . $app . '" from appstore', ['app' => 'updater']);
578
+		$this->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($log) {
579
+			$log->info('\OC\Updater::upgradeAppStoreApp: Update app "'.$app.'" from appstore', ['app' => 'updater']);
580 580
 		});
581
-		$this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($log) {
582
-			$log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']);
581
+		$this->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($log) {
582
+			$log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "'.$app.'" in appstore', ['app' => 'updater']);
583 583
 		});
584
-		$this->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($log) {
584
+		$this->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($log) {
585 585
 			$log->info('\OC\Updater::appUpgradeCheckBefore: Checking updates of apps', ['app' => 'updater']);
586 586
 		});
587
-		$this->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($log) {
588
-			$log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <' . $app . '> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']);
587
+		$this->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($log) {
588
+			$log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <'.$app.'> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']);
589 589
 		});
590
-		$this->listen('\OC\Updater', 'appUpgradeCheck', function () use ($log) {
590
+		$this->listen('\OC\Updater', 'appUpgradeCheck', function() use ($log) {
591 591
 			$log->info('\OC\Updater::appUpgradeCheck: Checked database schema update for apps', ['app' => 'updater']);
592 592
 		});
593
-		$this->listen('\OC\Updater', 'appUpgradeStarted', function ($app) use ($log) {
594
-			$log->info('\OC\Updater::appUpgradeStarted: Updating <' . $app . '> ...', ['app' => 'updater']);
593
+		$this->listen('\OC\Updater', 'appUpgradeStarted', function($app) use ($log) {
594
+			$log->info('\OC\Updater::appUpgradeStarted: Updating <'.$app.'> ...', ['app' => 'updater']);
595 595
 		});
596
-		$this->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($log) {
597
-			$log->info('\OC\Updater::appUpgrade: Updated <' . $app . '> to ' . $version, ['app' => 'updater']);
596
+		$this->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($log) {
597
+			$log->info('\OC\Updater::appUpgrade: Updated <'.$app.'> to '.$version, ['app' => 'updater']);
598 598
 		});
599
-		$this->listen('\OC\Updater', 'failure', function ($message) use($log) {
600
-			$log->error('\OC\Updater::failure: ' . $message, ['app' => 'updater']);
599
+		$this->listen('\OC\Updater', 'failure', function($message) use($log) {
600
+			$log->error('\OC\Updater::failure: '.$message, ['app' => 'updater']);
601 601
 		});
602
-		$this->listen('\OC\Updater', 'setDebugLogLevel', function () use($log) {
602
+		$this->listen('\OC\Updater', 'setDebugLogLevel', function() use($log) {
603 603
 			$log->info('\OC\Updater::setDebugLogLevel: Set log level to debug', ['app' => 'updater']);
604 604
 		});
605
-		$this->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($log) {
606
-			$log->info('\OC\Updater::resetLogLevel: Reset log level to ' . $logLevelName . '(' . $logLevel . ')', ['app' => 'updater']);
605
+		$this->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($log) {
606
+			$log->info('\OC\Updater::resetLogLevel: Reset log level to '.$logLevelName.'('.$logLevel.')', ['app' => 'updater']);
607 607
 		});
608
-		$this->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($log) {
608
+		$this->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($log) {
609 609
 			$log->info('\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...', ['app' => 'updater']);
610 610
 		});
611
-		$this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($log) {
611
+		$this->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($log) {
612 612
 			$log->info('\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check', ['app' => 'updater']);
613 613
 		});
614 614
 
Please login to merge, or discard this patch.
core/ajax/update.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 // need to send an initial message to force-init the event source,
45 45
 // which will then trigger its own CSRF check and produces its own CSRF error
46 46
 // message
47
-$eventSource->send('success', (string)$l->t('Preparing update'));
47
+$eventSource->send('success', (string) $l->t('Preparing update'));
48 48
 
49 49
 class FeedBackHandler {
50 50
 	/** @var integer */
@@ -80,21 +80,21 @@  discard block
 block discarded – undo
80 80
 				if (empty($desc)) {
81 81
 					$desc = $this->currentStep;
82 82
 				}
83
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
83
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
84 84
 				break;
85 85
 			case '\OC\Repair::finishProgress':
86 86
 				$this->progressStateMax = $this->progressStateStep;
87
-				$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
87
+				$this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
88 88
 				break;
89 89
 			case '\OC\Repair::step':
90 90
 				break;
91 91
 			case '\OC\Repair::info':
92 92
 				break;
93 93
 			case '\OC\Repair::warning':
94
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair warning: ') . $event->getArgument(0));
94
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair warning: ').$event->getArgument(0));
95 95
 				break;
96 96
 			case '\OC\Repair::error':
97
-				$this->eventSource->send('notice', (string)$this->l10n->t('Repair error: ') . $event->getArgument(0));
97
+				$this->eventSource->send('notice', (string) $this->l10n->t('Repair error: ').$event->getArgument(0));
98 98
 				break;
99 99
 		}
100 100
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 	$config = \OC::$server->getSystemConfig();
106 106
 	if ($config->getValue('upgrade.disable-web', false)) {
107
-		$eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
107
+		$eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
108 108
 		$eventSource->close();
109 109
 		exit();
110 110
 	}
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 	$dispatcher = \OC::$server->getEventDispatcher();
127 127
 	$dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) {
128 128
 		if ($event instanceof GenericEvent) {
129
-			$eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
129
+			$eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
130 130
 		}
131 131
 	});
132 132
 	$dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) {
133 133
 		if ($event instanceof GenericEvent) {
134
-			$eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
134
+			$eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
135 135
 		}
136 136
 	});
137 137
 	$feedBack = new FeedBackHandler($eventSource, $l);
@@ -143,67 +143,67 @@  discard block
 block discarded – undo
143 143
 	$dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']);
144 144
 	$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);
145 145
 
146
-	$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
147
-		$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
146
+	$updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) {
147
+		$eventSource->send('success', (string) $l->t('Turned on maintenance mode'));
148 148
 	});
149
-	$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
150
-		$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
149
+	$updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) {
150
+		$eventSource->send('success', (string) $l->t('Turned off maintenance mode'));
151 151
 	});
152
-	$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
153
-		$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
152
+	$updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) {
153
+		$eventSource->send('success', (string) $l->t('Maintenance mode is kept active'));
154 154
 	});
155
-	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) {
156
-		$eventSource->send('success', (string)$l->t('Updating database schema'));
155
+	$updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($eventSource, $l) {
156
+		$eventSource->send('success', (string) $l->t('Updating database schema'));
157 157
 	});
158
-	$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
159
-		$eventSource->send('success', (string)$l->t('Updated database'));
158
+	$updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) {
159
+		$eventSource->send('success', (string) $l->t('Updated database'));
160 160
 	});
161
-	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) {
162
-		$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)'));
161
+	$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($eventSource, $l) {
162
+		$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)'));
163 163
 	});
164
-	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
165
-		$eventSource->send('success', (string)$l->t('Checked database schema update'));
164
+	$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) {
165
+		$eventSource->send('success', (string) $l->t('Checked database schema update'));
166 166
 	});
167
-	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
168
-		$eventSource->send('success', (string)$l->t('Checking updates of apps'));
167
+	$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) {
168
+		$eventSource->send('success', (string) $l->t('Checking updates of apps'));
169 169
 	});
170
-	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
171
-		$eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app]));
170
+	$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use ($eventSource, $l) {
171
+		$eventSource->send('success', (string) $l->t('Checking for update of app "%s" in appstore', [$app]));
172 172
 	});
173
-	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
174
-		$eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app]));
173
+	$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use ($eventSource, $l) {
174
+		$eventSource->send('success', (string) $l->t('Update app "%s" from appstore', [$app]));
175 175
 	});
176
-	$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
177
-		$eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app]));
176
+	$updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use ($eventSource, $l) {
177
+		$eventSource->send('success', (string) $l->t('Checked for update of app "%s" in appstore', [$app]));
178 178
 	});
179
-	$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
180
-		$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]));
179
+	$updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) {
180
+		$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]));
181 181
 	});
182
-	$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
183
-		$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
182
+	$updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) {
183
+		$eventSource->send('success', (string) $l->t('Checked database schema update for apps'));
184 184
 	});
185
-	$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
186
-		$eventSource->send('success', (string)$l->t('Updated "%1$s" to %2$s', array($app, $version)));
185
+	$updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) {
186
+		$eventSource->send('success', (string) $l->t('Updated "%1$s" to %2$s', array($app, $version)));
187 187
 	});
188
-	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
189
-		$incompatibleApps[]= $app;
188
+	$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) {
189
+		$incompatibleApps[] = $app;
190 190
 	});
191
-	$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
191
+	$updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) {
192 192
 		$eventSource->send('failure', $message);
193 193
 		$eventSource->close();
194 194
 		$config->setSystemValue('maintenance', false);
195 195
 	});
196
-	$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
197
-		$eventSource->send('success', (string)$l->t('Set log level to debug'));
196
+	$updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
197
+		$eventSource->send('success', (string) $l->t('Set log level to debug'));
198 198
 	});
199
-	$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
200
-		$eventSource->send('success', (string)$l->t('Reset log level'));
199
+	$updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) {
200
+		$eventSource->send('success', (string) $l->t('Reset log level'));
201 201
 	});
202
-	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) {
203
-		$eventSource->send('success', (string)$l->t('Starting code integrity check'));
202
+	$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($eventSource, $l) {
203
+		$eventSource->send('success', (string) $l->t('Starting code integrity check'));
204 204
 	});
205
-	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) {
206
-		$eventSource->send('success', (string)$l->t('Finished code integrity check'));
205
+	$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($eventSource, $l) {
206
+		$eventSource->send('success', (string) $l->t('Finished code integrity check'));
207 207
 	});
208 208
 
209 209
 	try {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 			'level' => ILogger::ERROR,
214 214
 			'app' => 'update',
215 215
 		]);
216
-		$eventSource->send('failure', get_class($e) . ': ' . $e->getMessage());
216
+		$eventSource->send('failure', get_class($e).': '.$e->getMessage());
217 217
 		$eventSource->close();
218 218
 		exit();
219 219
 	}
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 
226 226
 	if (!empty($disabledApps)) {
227 227
 		$eventSource->send('notice',
228
-			(string)$l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)]));
228
+			(string) $l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)]));
229 229
 	}
230 230
 } else {
231
-	$eventSource->send('notice', (string)$l->t('Already up to date'));
231
+	$eventSource->send('notice', (string) $l->t('Already up to date'));
232 232
 }
233 233
 
234 234
 $eventSource->send('done', '');
Please login to merge, or discard this patch.