Completed
Pull Request — master (#4890)
by Blizzz
17:27
created
settings/templates/settings/personal/security.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
 
33 33
 
34 34
 <div id="security" class="section">
35
-	<h2><?php p($l->t('Security'));?></h2>
36
-	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.'));?></p>
35
+	<h2><?php p($l->t('Security')); ?></h2>
36
+	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.')); ?></p>
37 37
 	<table class="icon-loading">
38 38
 		<thead class="token-list-header">
39 39
 			<tr>
40
-				<th><?php p($l->t('Device'));?></th>
41
-				<th><?php p($l->t('Last activity'));?></th>
40
+				<th><?php p($l->t('Device')); ?></th>
41
+				<th><?php p($l->t('Last activity')); ?></th>
42 42
 				<th></th>
43 43
 			</tr>
44 44
 		</thead>
Please login to merge, or discard this patch.
lib/private/Settings/Manager.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 */
189 189
 	private function setupSectionEntry($sectionClassName, $type) {
190 190
 		if (!class_exists($sectionClassName)) {
191
-			$this->log->debug('Could not find ' . ucfirst($type) . ' section class ' . $sectionClassName);
191
+			$this->log->debug('Could not find '.ucfirst($type).' section class '.$sectionClassName);
192 192
 			return;
193 193
 		}
194 194
 		try {
@@ -200,13 +200,13 @@  discard block
 block discarded – undo
200 200
 
201 201
 		if (!$section instanceof ISection) {
202 202
 			$this->log->error(
203
-				ucfirst($type) .' section instance must implement \OCP\ISection. Invalid class: {class}',
203
+				ucfirst($type).' section instance must implement \OCP\ISection. Invalid class: {class}',
204 204
 				['class' => $sectionClassName]
205 205
 			);
206 206
 			return;
207 207
 		}
208 208
 		$table = $this->getSectionTableForType($type);
209
-		if(!$this->hasSection(get_class($section), $table)) {
209
+		if (!$this->hasSection(get_class($section), $table)) {
210 210
 			$this->addSection($section, $table);
211 211
 		} else {
212 212
 			$this->updateSection($section, $table);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
 	private function setupSettingsEntry($settingsClassName, $type) {
274 274
 		if (!class_exists($settingsClassName)) {
275
-			$this->log->debug('Could not find ' . $type . ' section class ' . $settingsClassName);
275
+			$this->log->debug('Could not find '.$type.' section class '.$settingsClassName);
276 276
 			return;
277 277
 		}
278 278
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
 		if (!$settings instanceof ISettings) {
288 288
 			$this->log->error(
289
-				ucfirst($type) . ' section instance must implement \OCP\Settings\ISettings. Invalid class: {class}',
289
+				ucfirst($type).' section instance must implement \OCP\Settings\ISettings. Invalid class: {class}',
290 290
 				['class' => $settingsClassName]
291 291
 			);
292 292
 			return;
@@ -300,18 +300,18 @@  discard block
 block discarded – undo
300 300
 	}
301 301
 
302 302
 	private function getSectionTableForType($type) {
303
-		if($type === 'admin') {
303
+		if ($type === 'admin') {
304 304
 			return Mapper::TABLE_ADMIN_SECTIONS;
305
-		} else if($type === 'personal') {
305
+		} else if ($type === 'personal') {
306 306
 			return Mapper::TABLE_PERSONAL_SECTIONS;
307 307
 		}
308 308
 		throw new \InvalidArgumentException('"admin" or "personal" expected');
309 309
 	}
310 310
 
311 311
 	private function getSettingsTableForType($type) {
312
-		if($type === 'admin') {
312
+		if ($type === 'admin') {
313 313
 			return Mapper::TABLE_ADMIN_SETTINGS;
314
-		} else if($type === 'personal') {
314
+		} else if ($type === 'personal') {
315 315
 			return Mapper::TABLE_PERSONAL_SETTINGS;
316 316
 		}
317 317
 		throw new \InvalidArgumentException('"admin" or "personal" expected');
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
 				);
419 419
 				$forms[$form->getPriority()] = [$form];
420 420
 			}
421
-			if($section === 'security') {
421
+			if ($section === 'security') {
422 422
 				/** @var ISettings $form */
423 423
 				$form = new Personal\Security();
424 424
 				$forms[$form->getPriority()] = [$form];
425 425
 			}
426
-			if($section === 'sync-clients') {
426
+			if ($section === 'sync-clients') {
427 427
 				/** @var ISettings $form */
428 428
 				$form = new Personal\SyncClients($this->config, $this->defaults);
429 429
 				$forms[$form->getPriority()] = [$form];
Please login to merge, or discard this patch.
lib/private/Settings/Personal/PersonalInfo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	public function getForm() {
94 94
 		$federatedFileSharingEnabled = $this->appManager->isEnabledForUser('federatedfilesharing');
95 95
 		$lookupServerUploadEnabled = false;
96
-		if($federatedFileSharingEnabled) {
96
+		if ($federatedFileSharingEnabled) {
97 97
 			$federatedFileSharing = new Application();
98 98
 			$shareProvider = $federatedFileSharing->getFederatedShareProvider();
99 99
 			$lookupServerUploadEnabled = $shareProvider->isLookupServerUploadEnabled();
@@ -199,16 +199,16 @@  discard block
 block discarded – undo
199 199
 		$commonLanguages = [];
200 200
 		$userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage());
201 201
 		$languageCodes = $this->l10nFactory->findAvailableLanguages();
202
-		foreach($languageCodes as $lang) {
202
+		foreach ($languageCodes as $lang) {
203 203
 			$l = \OC::$server->getL10N('settings', $lang);
204 204
 			// TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
205 205
 			$potentialName = (string) $l->t('__language_name__');
206
-			if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
206
+			if ($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
207 207
 				$ln = array('code' => $lang, 'name' => $potentialName);
208 208
 			} elseif ($lang === 'en') {
209 209
 				$ln = ['code' => $lang, 'name' => 'English (US)'];
210
-			}else{//fallback to language code
211
-				$ln=array('code'=>$lang, 'name'=>$lang);
210
+			} else {//fallback to language code
211
+				$ln = array('code'=>$lang, 'name'=>$lang);
212 212
 			}
213 213
 
214 214
 			// put appropriate languages into appropriate arrays, to print them sorted
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 			if ($lang === $userLang) {
217 217
 				$userLang = $ln;
218 218
 			} elseif (in_array($lang, self::COMMON_LANGUAGE_CODES)) {
219
-				$commonLanguages[array_search($lang, self::COMMON_LANGUAGE_CODES)]=$ln;
219
+				$commonLanguages[array_search($lang, self::COMMON_LANGUAGE_CODES)] = $ln;
220 220
 			} else {
221
-				$languages[]=$ln;
221
+				$languages[] = $ln;
222 222
 			}
223 223
 		}
224 224
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		ksort($commonLanguages);
234 234
 
235 235
 		// sort now by displayed language not the iso-code
236
-		usort( $languages, function ($a, $b) {
236
+		usort($languages, function($a, $b) {
237 237
 			if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
238 238
 				// If a doesn't have a name, but b does, list b before a
239 239
 				return 1;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 				default:
268 268
 					$message = $this->l->t('Verify');
269 269
 			}
270
-			$messageParameters[$property . 'Message'] = $message;
270
+			$messageParameters[$property.'Message'] = $message;
271 271
 		}
272 272
 		return $messageParameters;
273 273
 	}
Please login to merge, or discard this patch.