Completed
Pull Request — master (#4890)
by Blizzz
15:45
created
settings/templates/settings/frame.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 
24 24
 style('settings', 'settings');
25
-script('settings', [ 'settings', 'admin', 'log', 'certificates'] );
25
+script('settings', ['settings', 'admin', 'log', 'certificates']);
26 26
 script('core', ['multiselect', 'setupchecks']);
27 27
 script('files', 'jquery.fileupload');
28 28
 
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 	<ul>
33 33
 		<li class="settings-caption">Personal</li>
34 34
 		<?php
35
-		foreach($_['forms']['personal'] as $form) {
35
+		foreach ($_['forms']['personal'] as $form) {
36 36
 			if (isset($form['anchor'])) {
37 37
 				$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]);
38
-				$class = 'nav-icon-' . $form['anchor'];
38
+				$class = 'nav-icon-'.$form['anchor'];
39 39
 				$sectionName = $form['section-name'];
40 40
 				$active = $form['active'] ? ' class="active"' : '';
41 41
 				?>
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
 		?>
56 56
 
57 57
 		<?php
58
-		if(!empty($_['forms']['admin'])) {
58
+		if (!empty($_['forms']['admin'])) {
59 59
 			?>
60 60
 			<li class="settings-caption">Administration</li>
61 61
 			<?php
62 62
 		}
63
-		foreach($_['forms']['admin'] as $form) {
63
+		foreach ($_['forms']['admin'] as $form) {
64 64
 			if (isset($form['anchor'])) {
65 65
 
66 66
 				$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]);
67
-				$class = 'nav-icon-' . $form['anchor'];
67
+				$class = 'nav-icon-'.$form['anchor'];
68 68
 				$sectionName = $form['section-name'];
69 69
 				$active = $form['active'] ? ' class="active"' : '';
70 70
 		?>
Please login to merge, or discard this patch.
lib/private/Settings/Personal/SyncClients.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	 * @since 9.1
46 46
 	 */
47 47
 	public function getForm() {
48
-		$parameters = [ 'clients' => $this->getClientLinks() ];
48
+		$parameters = ['clients' => $this->getClientLinks()];
49 49
 		return new TemplateResponse('settings', 'settings/personal/sync-clients', $parameters);
50 50
 	}
51 51
 
Please login to merge, or discard this patch.
lib/public/Settings/IManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	/**
36 36
 	 * @since 9.1.0
37 37
 	 */
38
-	const KEY_ADMIN_SECTION  = 'admin-section';
38
+	const KEY_ADMIN_SECTION = 'admin-section';
39 39
 
40 40
 	/**
41 41
 	 * @since 12.0.0
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	/**
46 46
 	 * @since 12.0.0
47 47
 	 */
48
-	const KEY_PERSONAL_SECTION  = 'personal-section';
48
+	const KEY_PERSONAL_SECTION = 'personal-section';
49 49
 
50 50
 	/**
51 51
 	 * sets up settings according to data specified by an apps info.xml, within
Please login to merge, or discard this patch.
settings/templates/settings/personal/sync-clients.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
 ?>
27 27
 
28 28
 <div id="clientsbox" class="section clientsbox">
29
-	<h2><?php p($l->t('Get the apps to sync your files'));?></h2>
29
+	<h2><?php p($l->t('Get the apps to sync your files')); ?></h2>
30 30
 	<a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
31 31
 		<img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
32
-			 alt="<?php p($l->t('Desktop client'));?>" />
32
+			 alt="<?php p($l->t('Desktop client')); ?>" />
33 33
 	</a>
34 34
 	<a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
35 35
 		<img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
36
-			 alt="<?php p($l->t('Android app'));?>" />
36
+			 alt="<?php p($l->t('Android app')); ?>" />
37 37
 	</a>
38 38
 	<a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
39 39
 		<img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
40
-			 alt="<?php p($l->t('iOS app'));?>" />
40
+			 alt="<?php p($l->t('iOS app')); ?>" />
41 41
 	</a>
42 42
 
43 43
 	<p>
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			$l->t('If you want to support the project {contributeopen}join development{linkclose} or {contributeopen}spread the word{linkclose}!'))); ?>
54 54
 	</p>
55 55
 
56
-	<?php if(OC_APP::isEnabled('firstrunwizard')) {?>
57
-		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
56
+	<?php if (OC_APP::isEnabled('firstrunwizard')) {?>
57
+		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again')); ?></a></p>
58 58
 	<?php }?>
59 59
 </div>
Please login to merge, or discard this patch.
lib/private/Settings/Mapper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	 * @return array[] [['class' => string, 'priority' => int], ...]
105 105
 	 */
106 106
 	public function getSectionsFromDB($type) {
107
-		if($type === 'admin') {
107
+		if ($type === 'admin') {
108 108
 			$sectionsTable = self::TABLE_ADMIN_SECTIONS;
109 109
 			$settingsTable = self::TABLE_ADMIN_SETTINGS;
110
-		} else if($type === 'personal') {
110
+		} else if ($type === 'personal') {
111 111
 			$sectionsTable = self::TABLE_PERSONAL_SECTIONS;
112 112
 			$settingsTable = self::TABLE_PERSONAL_SETTINGS;
113 113
 		} else {
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 			->from($settingsTable, 'f')
121 121
 			->where($query->expr()->eq('s.id', 'f.section'));
122 122
 		$result = $query->execute();
123
-		return array_map(function ($row) {
124
-			$row['priority'] = (int)$row['priority'];
123
+		return array_map(function($row) {
124
+			$row['priority'] = (int) $row['priority'];
125 125
 			return $row;
126 126
 		}, $result->fetchAll());
127 127
 	}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 */
133 133
 	public function add($table, array $values) {
134 134
 		$query = $this->dbc->getQueryBuilder();
135
-		$values = array_map(function ($value) use ($query) {
135
+		$values = array_map(function($value) use ($query) {
136 136
 			return $query->createNamedParameter($value);
137 137
 		}, $values);
138 138
 		$query->insert($table)->values($values);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		$data = $resultStatement->fetchAll();
154 154
 		$resultStatement->closeCursor();
155 155
 
156
-		return array_map(function ($row) {
156
+		return array_map(function($row) {
157 157
 			return $row['class'];
158 158
 		}, $data);
159 159
 	}
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$row = $result->fetch();
177 177
 		$result->closeCursor();
178 178
 
179
-		return (bool)$row;
179
+		return (bool) $row;
180 180
 	}
181 181
 
182 182
 	/**
Please login to merge, or discard this patch.
settings/Controller/PersonalSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	protected function getSettings($section) {
68 68
 		$settings = $this->settingsManager->getPersonalSettings($section);
69 69
 		$formatted = $this->formatSettings($settings);
70
-		if($section === 'additional') {
70
+		if ($section === 'additional') {
71 71
 			$formatted['content'] .= $this->getLegacyForms();
72 72
 		}
73 73
 		return $formatted;
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
 	private function getLegacyForms() {
80 80
 		$forms = \OC_App::getForms('personal');
81 81
 
82
-		$forms = array_map(function ($form) {
82
+		$forms = array_map(function($form) {
83 83
 			if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
84
-				$sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]);
84
+				$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
85 85
 				$sectionName = str_replace('</h2>', '', $sectionName);
86 86
 				$anchor = strtolower($sectionName);
87 87
 				$anchor = str_replace(' ', '-', $anchor);
Please login to merge, or discard this patch.
settings/Controller/AdminSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	protected function getSettings($section) {
78 78
 		$settings = $this->settingsManager->getAdminSettings($section);
79 79
 		$formatted = $this->formatSettings($settings);
80
-		if($section === 'additional') {
80
+		if ($section === 'additional') {
81 81
 			$formatted['content'] .= $this->getLegacyForms();
82 82
 		}
83 83
 		return $formatted;
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	private function getLegacyForms() {
90 90
 		$forms = \OC_App::getForms('admin');
91 91
 
92
-		$forms = array_map(function ($form) {
92
+		$forms = array_map(function($form) {
93 93
 			if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
94
-				$sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]);
94
+				$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
95 95
 				$sectionName = str_replace('</h2>', '', $sectionName);
96 96
 				$anchor = strtolower($sectionName);
97 97
 				$anchor = str_replace(' ', '-', $anchor);
Please login to merge, or discard this patch.
apps/files_external/appinfo/app.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
29 29
 
30 30
 OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
31 31
 
32
-require_once __DIR__ . '/../3rdparty/autoload.php';
32
+require_once __DIR__.'/../3rdparty/autoload.php';
33 33
 
34 34
 // register Application object singleton
35 35
 \OC_Mount_Config::$app = new \OCA\Files_External\AppInfo\Application();
36 36
 $appContainer = \OC_Mount_Config::$app->getContainer();
37 37
 
38
-\OCA\Files\App::getNavigationManager()->add(function () {
38
+\OCA\Files\App::getNavigationManager()->add(function() {
39 39
 	$l = \OC::$server->getL10N('files_external');
40 40
 	return [
41 41
 		'id' => 'extstoragemounts',
Please login to merge, or discard this patch.
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.