Completed
Push — stable13 ( 2d5d8b...1a016f )
by Roeland
17:00
created
core/templates/installation.php 3 patches
Braces   +16 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,8 +18,11 @@  discard block
 block discarded – undo
18 18
 			<?php if(is_array($err)):?>
19 19
 				<?php print_unescaped($err['error']); ?>
20 20
 				<span class='hint'><?php print_unescaped($err['hint']); ?></span>
21
-			<?php else: ?>
22
-				<?php print_unescaped($err); ?>
21
+			<?php else {
22
+    : ?>
23
+				<?php print_unescaped($err);
24
+}
25
+?>
23 26
 			<?php endif; ?>
24 27
 		</p>
25 28
 		<?php endforeach; ?>
@@ -75,8 +78,12 @@  discard block
 block discarded – undo
75 78
 
76 79
 	<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
77 80
 	<fieldset id='databaseBackend'>
78
-		<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
79
-			$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
81
+		<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) {
82
+			$hasOtherDB = true;
83
+} else {
84
+			    $hasOtherDB =false;
85
+			}
86
+			//other than SQLite ?>
80 87
 		<legend><?php p($l->t( 'Configure the database' )); ?></legend>
81 88
 		<div id="selectDbType">
82 89
 		<?php foreach($_['databases'] as $type => $label): ?>
@@ -88,11 +95,14 @@  discard block
 block discarded – undo
88 95
 				<?php p($l->t( 'For more details check out the documentation.' )); ?> ↗</a>
89 96
 		</p>
90 97
 		<input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
91
-		<?php else: ?>
98
+		<?php else {
99
+    : ?>
92 100
 		<input type="radio" name="dbtype" value="<?php p($type) ?>" id="<?php p($type) ?>"
93 101
 			<?php print_unescaped($_['dbtype'] === $type ? 'checked="checked" ' : '') ?>/>
94 102
 		<label class="<?php p($type) ?>" for="<?php p($type) ?>"><?php p($label) ?></label>
95
-		<?php endif; ?>
103
+		<?php endif;
104
+}
105
+?>
96 106
 		<?php endforeach; ?>
97 107
 		</div>
98 108
 	</fieldset>
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 script('core', [
3
-	'jquery-showpassword',
4
-	'installation'
3
+    'jquery-showpassword',
4
+    'installation'
5 5
 ]);
6 6
 ?>
7 7
 <input type='hidden' id='hasMySQL' value='<?php p($_['hasMySQL']) ?>'>
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 		<legend><strong><?php p($l->t('Security warning'));?></strong></legend>
31 31
 		<p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
32 32
 		<?php print_unescaped($l->t(
33
-			'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer noopener">documentation</a>.',
34
-			link_to_docs('admin-install')
35
-		)); ?></p>
33
+            'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer noopener">documentation</a>.',
34
+            link_to_docs('admin-install')
35
+        )); ?></p>
36 36
 	</fieldset>
37 37
 	<?php endif; ?>
38 38
 	<fieldset id="adminaccount">
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
77 77
 	<fieldset id='databaseBackend'>
78 78
 		<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
79
-			$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
79
+            $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
80 80
 		<legend><?php p($l->t( 'Configure the database' )); ?></legend>
81 81
 		<div id="selectDbType">
82 82
 		<?php foreach($_['databases'] as $type => $label): ?>
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 <input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
11 11
 <form action="index.php" method="post">
12 12
 <input type="hidden" name="install" value="true">
13
-	<?php if(count($_['errors']) > 0): ?>
13
+	<?php if (count($_['errors']) > 0): ?>
14 14
 	<fieldset class="warning">
15
-		<legend><strong><?php p($l->t('Error'));?></strong></legend>
16
-		<?php foreach($_['errors'] as $err): ?>
15
+		<legend><strong><?php p($l->t('Error')); ?></strong></legend>
16
+		<?php foreach ($_['errors'] as $err): ?>
17 17
 		<p>
18
-			<?php if(is_array($err)):?>
18
+			<?php if (is_array($err)):?>
19 19
 				<?php print_unescaped($err['error']); ?>
20 20
 				<span class='hint'><?php print_unescaped($err['hint']); ?></span>
21 21
 			<?php else: ?>
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 		<?php endforeach; ?>
26 26
 	</fieldset>
27 27
 	<?php endif; ?>
28
-	<?php if(!$_['htaccessWorking']): ?>
28
+	<?php if (!$_['htaccessWorking']): ?>
29 29
 	<fieldset class="warning">
30
-		<legend><strong><?php p($l->t('Security warning'));?></strong></legend>
31
-		<p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
30
+		<legend><strong><?php p($l->t('Security warning')); ?></strong></legend>
31
+		<p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.')); ?><br>
32 32
 		<?php print_unescaped($l->t(
33 33
 			'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer noopener">documentation</a>.',
34 34
 			link_to_docs('admin-install')
@@ -36,35 +36,35 @@  discard block
 block discarded – undo
36 36
 	</fieldset>
37 37
 	<?php endif; ?>
38 38
 	<fieldset id="adminaccount">
39
-		<legend><?php print_unescaped($l->t( 'Create an <strong>admin account</strong>' )); ?></legend>
39
+		<legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend>
40 40
 		<p class="grouptop">
41 41
 			<input type="text" name="adminlogin" id="adminlogin"
42
-				placeholder="<?php p($l->t( 'Username' )); ?>"
42
+				placeholder="<?php p($l->t('Username')); ?>"
43 43
 				value="<?php p($_['adminlogin']); ?>"
44 44
 				autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
45
-			<label for="adminlogin" class="infield"><?php p($l->t( 'Username' )); ?></label>
45
+			<label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label>
46 46
 		</p>
47 47
 		<p class="groupbottom">
48 48
 			<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
49
-				placeholder="<?php p($l->t( 'Password' )); ?>"
49
+				placeholder="<?php p($l->t('Password')); ?>"
50 50
 				value="<?php p($_['adminpass']); ?>"
51 51
 				autocomplete="off" autocapitalize="none" autocorrect="off" required>
52
-			<label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label>
52
+			<label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label>
53 53
 			<input type="checkbox" id="show" name="show">
54 54
 			<label for="show"></label>
55 55
 		</p>
56 56
 	</fieldset>
57 57
 
58
-	<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
58
+	<?php if (!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
59 59
 	<fieldset id="advancedHeader">
60
-		<legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
60
+		<legend><a id="showAdvanced"><?php p($l->t('Storage & database')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
61 61
 	</fieldset>
62 62
 	<?php endif; ?>
63 63
 
64
-	<?php if(!$_['directoryIsSet'] OR count($_['errors']) > 0): ?>
64
+	<?php if (!$_['directoryIsSet'] OR count($_['errors']) > 0): ?>
65 65
 	<fieldset id="datadirField">
66 66
 		<div id="datadirContent">
67
-			<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
67
+			<label for="directory"><?php p($l->t('Data folder')); ?></label>
68 68
 			<input type="text" name="directory" id="directory"
69 69
 				placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
70 70
 				value="<?php p($_['directory']); ?>"
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
 	</fieldset>
74 74
 	<?php endif; ?>
75 75
 
76
-	<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
76
+	<?php if (!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
77 77
 	<fieldset id='databaseBackend'>
78
-		<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
79
-			$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
80
-		<legend><?php p($l->t( 'Configure the database' )); ?></legend>
78
+		<?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
79
+			$hasOtherDB = true; else $hasOtherDB = false; //other than SQLite ?>
80
+		<legend><?php p($l->t('Configure the database')); ?></legend>
81 81
 		<div id="selectDbType">
82
-		<?php foreach($_['databases'] as $type => $label): ?>
83
-		<?php if(count($_['databases']) === 1): ?>
82
+		<?php foreach ($_['databases'] as $type => $label): ?>
83
+		<?php if (count($_['databases']) === 1): ?>
84 84
 		<p class="info">
85
-			<?php p($l->t( 'Only %s is available.', array($label) )); ?>
86
-			<?php p($l->t( 'Install and activate additional PHP modules to choose other database types.' )); ?><br>
85
+			<?php p($l->t('Only %s is available.', array($label))); ?>
86
+			<?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br>
87 87
 			<a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener">
88
-				<?php p($l->t( 'For more details check out the documentation.' )); ?> ↗</a>
88
+				<?php p($l->t('For more details check out the documentation.')); ?> ↗</a>
89 89
 		</p>
90 90
 		<input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
91 91
 		<?php else: ?>
@@ -97,75 +97,75 @@  discard block
 block discarded – undo
97 97
 		</div>
98 98
 	</fieldset>
99 99
 
100
-		<?php if($hasOtherDB): ?>
100
+		<?php if ($hasOtherDB): ?>
101 101
 		<fieldset id='databaseField'>
102 102
 		<div id="use_other_db">
103 103
 			<p class="grouptop">
104
-				<label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label>
104
+				<label for="dbuser" class="infield"><?php p($l->t('Database user')); ?></label>
105 105
 				<input type="text" name="dbuser" id="dbuser"
106
-					placeholder="<?php p($l->t( 'Database user' )); ?>"
106
+					placeholder="<?php p($l->t('Database user')); ?>"
107 107
 					value="<?php p($_['dbuser']); ?>"
108 108
 					autocomplete="off" autocapitalize="none" autocorrect="off">
109 109
 			</p>
110 110
 			<p class="groupmiddle">
111 111
 				<input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle"
112
-					placeholder="<?php p($l->t( 'Database password' )); ?>"
112
+					placeholder="<?php p($l->t('Database password')); ?>"
113 113
 					value="<?php p($_['dbpass']); ?>"
114 114
 					autocomplete="off" autocapitalize="none" autocorrect="off">
115
-				<label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label>
115
+				<label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label>
116 116
 				<input type="checkbox" id="dbpassword-toggle" name="dbpassword-toggle">
117 117
 				<label for="dbpassword-toggle"></label>
118 118
 			</p>
119 119
 			<p class="groupmiddle">
120
-				<label for="dbname" class="infield"><?php p($l->t( 'Database name' )); ?></label>
120
+				<label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label>
121 121
 				<input type="text" name="dbname" id="dbname"
122
-					placeholder="<?php p($l->t( 'Database name' )); ?>"
122
+					placeholder="<?php p($l->t('Database name')); ?>"
123 123
 					value="<?php p($_['dbname']); ?>"
124 124
 					autocomplete="off" autocapitalize="none" autocorrect="off"
125 125
 					pattern="[0-9a-zA-Z$_-]+">
126 126
 			</p>
127
-			<?php if($_['hasOracle']): ?>
127
+			<?php if ($_['hasOracle']): ?>
128 128
 			<div id="use_oracle_db">
129 129
 				<p class="groupmiddle">
130
-					<label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label>
130
+					<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
131 131
 					<input type="text" name="dbtablespace" id="dbtablespace"
132
-						placeholder="<?php p($l->t( 'Database tablespace' )); ?>"
132
+						placeholder="<?php p($l->t('Database tablespace')); ?>"
133 133
 						value="<?php p($_['dbtablespace']); ?>"
134 134
 						autocomplete="off" autocapitalize="none" autocorrect="off">
135 135
 				</p>
136 136
 			</div>
137 137
 			<?php endif; ?>
138 138
 			<p class="groupbottom">
139
-				<label for="dbhost" class="infield"><?php p($l->t( 'Database host' )); ?></label>
139
+				<label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label>
140 140
 				<input type="text" name="dbhost" id="dbhost"
141
-					placeholder="<?php p($l->t( 'Database host' )); ?>"
141
+					placeholder="<?php p($l->t('Database host')); ?>"
142 142
 					value="<?php p($_['dbhost']); ?>"
143 143
 					autocomplete="off" autocapitalize="none" autocorrect="off">
144 144
 			</p>
145 145
 			<p class="info">
146
-				<?php p($l->t( 'Please specify the port number along with the host name (e.g., localhost:5432).' )); ?>
146
+				<?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?>
147 147
 			</p>
148 148
 		</div>
149 149
 		</fieldset>
150 150
 		<?php endif; ?>
151 151
 	<?php endif; ?>
152 152
 
153
-	<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
153
+	<?php if (!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
154 154
 		<fieldset id="sqliteInformation" class="warning">
155
-			<legend><?php p($l->t('Performance warning'));?></legend>
156
-			<p><?php p($l->t('SQLite will be used as database.'));?></p>
157
-			<p><?php p($l->t('For larger installations we recommend to choose a different database backend.'));?></p>
155
+			<legend><?php p($l->t('Performance warning')); ?></legend>
156
+			<p><?php p($l->t('SQLite will be used as database.')); ?></p>
157
+			<p><?php p($l->t('For larger installations we recommend to choose a different database backend.')); ?></p>
158 158
 			<p><?php p($l->t('Especially when using the desktop client for file syncing the use of SQLite is discouraged.')); ?></p>
159 159
 		</fieldset>
160 160
 	<?php endif ?>
161 161
 
162 162
 	<div class="icon-loading-dark float-spinner">&nbsp;</div>
163 163
 
164
-	<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>"></div>
164
+	<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Finish setup')); ?>" data-finishing="<?php p($l->t('Finishing …')); ?>"></div>
165 165
 
166 166
 	<p class="info">
167 167
 		<span class="icon-info-white"></span>
168
-		<?php p($l->t('Need help?'));?>
169
-		<a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation'));?> ↗</a>
168
+		<?php p($l->t('Need help?')); ?>
169
+		<a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation')); ?> ↗</a>
170 170
 	</p>
171 171
 </form>
Please login to merge, or discard this patch.
core/templates/exception.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2
-	/** @var array $_ */
3
-	/** @var \OCP\IL10N $l */
2
+    /** @var array $_ */
3
+    /** @var \OCP\IL10N $l */
4 4
 
5 5
 style('core', ['styles', 'header']);
6 6
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	<ul>
15 15
 		<li><?php p($l->t('Remote Address: %s', $_['remoteAddr'])) ?></li>
16 16
 		<li><?php p($l->t('Request ID: %s', $_['requestID'])) ?></li>
17
-		<?php if($_['debugMode']): ?>
17
+		<?php if ($_['debugMode']): ?>
18 18
 			<li><?php p($l->t('Type: %s', $_['errorClass'])) ?></li>
19 19
 			<li><?php p($l->t('Code: %s', $_['errorCode'])) ?></li>
20 20
 			<li><?php p($l->t('Message: %s', $_['errorMsg'])) ?></li>
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 		<?php endif; ?>
24 24
 	</ul>
25 25
 
26
-	<?php if($_['debugMode']): ?>
26
+	<?php if ($_['debugMode']): ?>
27 27
 		<br />
28 28
 		<h3><?php p($l->t('Trace')) ?></h3>
29 29
 		<pre><?php p($_['trace']) ?></pre>
Please login to merge, or discard this patch.
core/templates/404.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,13 @@
 block discarded – undo
14 14
 ?>
15 15
 <?php if (isset($_['content'])): ?>
16 16
 	<?php print_unescaped($_['content']) ?>
17
-<?php else: ?>
17
+<?php else {
18
+    : ?>
18 19
 	<ul>
19 20
 		<li class="error">
20
-			<?php p($l->t('File not found')); ?><br>
21
+			<?php p($l->t('File not found'));
22
+}
23
+?><br>
21 24
 			<p class="hint"><?php p($l->t('The specified document has not been found on the server.')); ?></p>
22 25
 			<p class="hint"><a href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p>
23 26
 		</li>
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 /** @var $theme OCP\Defaults */
5 5
 // @codeCoverageIgnoreStart
6 6
 if(!isset($_)) {//standalone  page is not supported anymore - redirect to /
7
-	require_once '../../lib/base.php';
7
+    require_once '../../lib/base.php';
8 8
 
9
-	$urlGenerator = \OC::$server->getURLGenerator();
10
-	header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
11
-	exit;
9
+    $urlGenerator = \OC::$server->getURLGenerator();
10
+    header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
11
+    exit;
12 12
 }
13 13
 // @codeCoverageIgnoreEnd
14 14
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 /** @var $l \OCP\IL10N */
4 4
 /** @var $theme OCP\Defaults */
5 5
 // @codeCoverageIgnoreStart
6
-if(!isset($_)) {//standalone  page is not supported anymore - redirect to /
6
+if (!isset($_)) {//standalone  page is not supported anymore - redirect to /
7 7
 	require_once '../../lib/base.php';
8 8
 
9 9
 	$urlGenerator = \OC::$server->getURLGenerator();
10
-	header('Location: ' . $urlGenerator->getAbsoluteURL('/'));
10
+	header('Location: '.$urlGenerator->getAbsoluteURL('/'));
11 11
 	exit;
12 12
 }
13 13
 // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
core/routes.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,6 +101,6 @@
 block discarded – undo
101 101
 });
102 102
 
103 103
 // used for heartbeat
104
-$this->create('heartbeat', '/heartbeat')->action(function(){
104
+$this->create('heartbeat', '/heartbeat')->action(function() {
105 105
 	// do nothing
106 106
 });
Please login to merge, or discard this patch.
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -35,42 +35,42 @@  discard block
 block discarded – undo
35 35
 
36 36
 $application = new Application();
37 37
 $application->registerRoutes($this, [
38
-	'routes' => [
39
-		['name' => 'lost#email', 'url' => '/lostpassword/email', 'verb' => 'POST'],
40
-		['name' => 'lost#resetform', 'url' => '/lostpassword/reset/form/{token}/{userId}', 'verb' => 'GET'],
41
-		['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'],
42
-		['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'],
43
-		['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'],
44
-		['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'],
45
-		['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'],
46
-		['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
47
-		['name' => 'avatar#postAvatar', 'url' => '/avatar/', 'verb' => 'POST'],
48
-		['name' => 'login#tryLogin', 'url' => '/login', 'verb' => 'POST'],
49
-		['name' => 'login#confirmPassword', 'url' => '/login/confirm', 'verb' => 'POST'],
50
-		['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
51
-		['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
52
-		['name' => 'ClientFlowLogin#showAuthPickerPage', 'url' => '/login/flow', 'verb' => 'GET'],
53
-		['name' => 'ClientFlowLogin#redirectPage', 'url' => '/login/flow/redirect', 'verb' => 'GET'],
54
-		['name' => 'ClientFlowLogin#generateAppPassword', 'url' => '/login/flow', 'verb' => 'POST'],
55
-		['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
56
-		['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
57
-		['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
58
-		['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'],
59
-		['name' => 'Preview#getPreview', 'url' => '/core/preview', 'verb' => 'GET'],
60
-		['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
61
-		['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
62
-		['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
63
-		['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'POST'],
64
-		['name' => 'contactsMenu#findOne', 'url' => '/contactsmenu/findOne', 'verb' => 'POST'],
65
-		['name' => 'AutoComplete#get', 'url' => 'autocomplete/get', 'verb' => 'GET'],
66
-		['name' => 'WalledGarden#get', 'url' => '/204', 'verb' => 'GET'],
67
-	],
68
-	'ocs' => [
69
-		['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
70
-		['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
71
-		['root' => '/person', 'name' => 'OCS#personCheck', 'url' => '/check', 'verb' => 'POST'],
72
-		['root' => '/identityproof', 'name' => 'OCS#getIdentityProof', 'url' => '/key/{cloudId}', 'verb' => 'GET'],
73
-	],
38
+    'routes' => [
39
+        ['name' => 'lost#email', 'url' => '/lostpassword/email', 'verb' => 'POST'],
40
+        ['name' => 'lost#resetform', 'url' => '/lostpassword/reset/form/{token}/{userId}', 'verb' => 'GET'],
41
+        ['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'],
42
+        ['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'],
43
+        ['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'],
44
+        ['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'],
45
+        ['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'],
46
+        ['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
47
+        ['name' => 'avatar#postAvatar', 'url' => '/avatar/', 'verb' => 'POST'],
48
+        ['name' => 'login#tryLogin', 'url' => '/login', 'verb' => 'POST'],
49
+        ['name' => 'login#confirmPassword', 'url' => '/login/confirm', 'verb' => 'POST'],
50
+        ['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
51
+        ['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
52
+        ['name' => 'ClientFlowLogin#showAuthPickerPage', 'url' => '/login/flow', 'verb' => 'GET'],
53
+        ['name' => 'ClientFlowLogin#redirectPage', 'url' => '/login/flow/redirect', 'verb' => 'GET'],
54
+        ['name' => 'ClientFlowLogin#generateAppPassword', 'url' => '/login/flow', 'verb' => 'POST'],
55
+        ['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
56
+        ['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
57
+        ['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
58
+        ['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'],
59
+        ['name' => 'Preview#getPreview', 'url' => '/core/preview', 'verb' => 'GET'],
60
+        ['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
61
+        ['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
62
+        ['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
63
+        ['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'POST'],
64
+        ['name' => 'contactsMenu#findOne', 'url' => '/contactsmenu/findOne', 'verb' => 'POST'],
65
+        ['name' => 'AutoComplete#get', 'url' => 'autocomplete/get', 'verb' => 'GET'],
66
+        ['name' => 'WalledGarden#get', 'url' => '/204', 'verb' => 'GET'],
67
+    ],
68
+    'ocs' => [
69
+        ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
70
+        ['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
71
+        ['root' => '/person', 'name' => 'OCS#personCheck', 'url' => '/check', 'verb' => 'POST'],
72
+        ['root' => '/identityproof', 'name' => 'OCS#getIdentityProof', 'url' => '/key/{cloudId}', 'verb' => 'GET'],
73
+    ],
74 74
 ]);
75 75
 
76 76
 // Post installation check
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
 // Core ajax actions
80 80
 // Search
81 81
 $this->create('search_ajax_search', '/core/search')
82
-	->actionInclude('core/search/ajax/search.php');
82
+    ->actionInclude('core/search/ajax/search.php');
83 83
 // Routing
84 84
 $this->create('core_ajax_update', '/core/ajax/update.php')
85
-	->actionInclude('core/ajax/update.php');
85
+    ->actionInclude('core/ajax/update.php');
86 86
 
87 87
 // File routes
88 88
 $this->create('files.viewcontroller.showFile', '/f/{fileid}')->action(function($urlParams) {
89
-	$app = new \OCA\Files\AppInfo\Application($urlParams);
90
-	$app->dispatch('ViewController', 'index');
89
+    $app = new \OCA\Files\AppInfo\Application($urlParams);
90
+    $app->dispatch('ViewController', 'index');
91 91
 });
92 92
 
93 93
 // Call routes
@@ -96,57 +96,57 @@  discard block
 block discarded – undo
96 96
  * @suppress PhanUndeclaredClassMethod
97 97
  */
98 98
 $this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(function($urlParams) {
99
-	if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
100
-		$app = new \OCA\Spreed\AppInfo\Application($urlParams);
101
-		$app->dispatch('PageController', 'index');
102
-	} else {
103
-		throw new \OC\HintException('App spreed is not enabled');
104
-	}
99
+    if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
100
+        $app = new \OCA\Spreed\AppInfo\Application($urlParams);
101
+        $app->dispatch('PageController', 'index');
102
+    } else {
103
+        throw new \OC\HintException('App spreed is not enabled');
104
+    }
105 105
 });
106 106
 
107 107
 // Sharing routes
108 108
 $this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
109
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
110
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
111
-		$app->dispatch('ShareController', 'showShare');
112
-	} else {
113
-		throw new \OC\HintException('App file sharing is not enabled');
114
-	}
109
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
110
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
111
+        $app->dispatch('ShareController', 'showShare');
112
+    } else {
113
+        throw new \OC\HintException('App file sharing is not enabled');
114
+    }
115 115
 });
116 116
 $this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
117
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
118
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
119
-		$app->dispatch('ShareController', 'authenticate');
120
-	} else {
121
-		throw new \OC\HintException('App file sharing is not enabled');
122
-	}
117
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
118
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
119
+        $app->dispatch('ShareController', 'authenticate');
120
+    } else {
121
+        throw new \OC\HintException('App file sharing is not enabled');
122
+    }
123 123
 });
124 124
 $this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
125
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
126
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
127
-		$app->dispatch('ShareController', 'showAuthenticate');
128
-	} else {
129
-		throw new \OC\HintException('App file sharing is not enabled');
130
-	}
125
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
126
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
127
+        $app->dispatch('ShareController', 'showAuthenticate');
128
+    } else {
129
+        throw new \OC\HintException('App file sharing is not enabled');
130
+    }
131 131
 });
132 132
 $this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
133
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
134
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
135
-		$app->dispatch('ShareController', 'downloadShare');
136
-	} else {
137
-		throw new \OC\HintException('App file sharing is not enabled');
138
-	}
133
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
134
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
135
+        $app->dispatch('ShareController', 'downloadShare');
136
+    } else {
137
+        throw new \OC\HintException('App file sharing is not enabled');
138
+    }
139 139
 });
140 140
 $this->create('files_sharing.publicpreview.directLink', '/s/{token}/preview')->get()->action(function($urlParams) {
141
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
142
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
143
-		$app->dispatch('PublicPreviewController', 'directLink');
144
-	} else {
145
-		throw new \OC\HintException('App file sharing is not enabled');
146
-	}
141
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
142
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
143
+        $app->dispatch('PublicPreviewController', 'directLink');
144
+    } else {
145
+        throw new \OC\HintException('App file sharing is not enabled');
146
+    }
147 147
 });
148 148
 
149 149
 // used for heartbeat
150 150
 $this->create('heartbeat', '/heartbeat')->action(function(){
151
-	// do nothing
151
+    // do nothing
152 152
 });
Please login to merge, or discard this patch.
core/search/ajax/search.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,32 +31,32 @@
 block discarded – undo
31 31
 \OC::$server->getSession()->close();
32 32
 
33 33
 if (isset($_GET['query'])) {
34
-	$query = $_GET['query'];
34
+    $query = $_GET['query'];
35 35
 } else {
36
-	$query = '';
36
+    $query = '';
37 37
 }
38 38
 if (isset($_GET['inApps'])) {
39
-	$inApps = $_GET['inApps'];
40
-	if (is_string($inApps)) {
41
-		$inApps = array($inApps);
42
-	}
39
+    $inApps = $_GET['inApps'];
40
+    if (is_string($inApps)) {
41
+        $inApps = array($inApps);
42
+    }
43 43
 } else {
44
-	$inApps = array();
44
+    $inApps = array();
45 45
 }
46 46
 if (isset($_GET['page'])) {
47
-	$page = (int)$_GET['page'];
47
+    $page = (int)$_GET['page'];
48 48
 } else {
49
-	$page = 1;
49
+    $page = 1;
50 50
 }
51 51
 if (isset($_GET['size'])) {
52
-	$size = (int)$_GET['size'];
52
+    $size = (int)$_GET['size'];
53 53
 } else {
54
-	$size = 30;
54
+    $size = 30;
55 55
 }
56 56
 if($query) {
57
-	$result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58
-	OC_JSON::encodedPrint($result);
57
+    $result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58
+    OC_JSON::encodedPrint($result);
59 59
 }
60 60
 else {
61
-	echo 'false';
61
+    echo 'false';
62 62
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
 	$inApps = array();
45 45
 }
46 46
 if (isset($_GET['page'])) {
47
-	$page = (int)$_GET['page'];
47
+	$page = (int) $_GET['page'];
48 48
 } else {
49 49
 	$page = 1;
50 50
 }
51 51
 if (isset($_GET['size'])) {
52
-	$size = (int)$_GET['size'];
52
+	$size = (int) $_GET['size'];
53 53
 } else {
54 54
 	$size = 30;
55 55
 }
56
-if($query) {
56
+if ($query) {
57 57
 	$result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58 58
 	OC_JSON::encodedPrint($result);
59 59
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,6 @@
 block discarded – undo
56 56
 if($query) {
57 57
 	$result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size);
58 58
 	OC_JSON::encodedPrint($result);
59
-}
60
-else {
59
+} else {
61 60
 	echo 'false';
62 61
 }
Please login to merge, or discard this patch.
core/Controller/SetupController.php 2 patches
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -31,97 +31,97 @@
 block discarded – undo
31 31
 use OC\Setup;
32 32
 
33 33
 class SetupController {
34
-	/** @var Setup */
35
-	protected $setupHelper;
36
-	/** @var string */
37
-	private $autoConfigFile;
34
+    /** @var Setup */
35
+    protected $setupHelper;
36
+    /** @var string */
37
+    private $autoConfigFile;
38 38
 
39
-	/**
40
-	 * @param Setup $setupHelper
41
-	 */
42
-	function __construct(Setup $setupHelper) {
43
-		$this->autoConfigFile = \OC::$configDir.'autoconfig.php';
44
-		$this->setupHelper = $setupHelper;
45
-	}
39
+    /**
40
+     * @param Setup $setupHelper
41
+     */
42
+    function __construct(Setup $setupHelper) {
43
+        $this->autoConfigFile = \OC::$configDir.'autoconfig.php';
44
+        $this->setupHelper = $setupHelper;
45
+    }
46 46
 
47
-	/**
48
-	 * @param $post
49
-	 */
50
-	public function run($post) {
51
-		// Check for autosetup:
52
-		$post = $this->loadAutoConfig($post);
53
-		$opts = $this->setupHelper->getSystemInfo();
47
+    /**
48
+     * @param $post
49
+     */
50
+    public function run($post) {
51
+        // Check for autosetup:
52
+        $post = $this->loadAutoConfig($post);
53
+        $opts = $this->setupHelper->getSystemInfo();
54 54
 
55
-		// convert 'abcpassword' to 'abcpass'
56
-		if (isset($post['adminpassword'])) {
57
-			$post['adminpass'] = $post['adminpassword'];
58
-		}
59
-		if (isset($post['dbpassword'])) {
60
-			$post['dbpass'] = $post['dbpassword'];
61
-		}
55
+        // convert 'abcpassword' to 'abcpass'
56
+        if (isset($post['adminpassword'])) {
57
+            $post['adminpass'] = $post['adminpassword'];
58
+        }
59
+        if (isset($post['dbpassword'])) {
60
+            $post['dbpass'] = $post['dbpassword'];
61
+        }
62 62
 
63
-		if(isset($post['install']) AND $post['install']=='true') {
64
-			// We have to launch the installation process :
65
-			$e = $this->setupHelper->install($post);
66
-			$errors = array('errors' => $e);
63
+        if(isset($post['install']) AND $post['install']=='true') {
64
+            // We have to launch the installation process :
65
+            $e = $this->setupHelper->install($post);
66
+            $errors = array('errors' => $e);
67 67
 
68
-			if(count($e) > 0) {
69
-				$options = array_merge($opts, $post, $errors);
70
-				$this->display($options);
71
-			} else {
72
-				$this->finishSetup();
73
-			}
74
-		} else {
75
-			$options = array_merge($opts, $post);
76
-			$this->display($options);
77
-		}
78
-	}
68
+            if(count($e) > 0) {
69
+                $options = array_merge($opts, $post, $errors);
70
+                $this->display($options);
71
+            } else {
72
+                $this->finishSetup();
73
+            }
74
+        } else {
75
+            $options = array_merge($opts, $post);
76
+            $this->display($options);
77
+        }
78
+    }
79 79
 
80
-	public function display($post) {
81
-		$defaults = array(
82
-			'adminlogin' => '',
83
-			'adminpass' => '',
84
-			'dbuser' => '',
85
-			'dbpass' => '',
86
-			'dbname' => '',
87
-			'dbtablespace' => '',
88
-			'dbhost' => 'localhost',
89
-			'dbtype' => '',
90
-		);
91
-		$parameters = array_merge($defaults, $post);
80
+    public function display($post) {
81
+        $defaults = array(
82
+            'adminlogin' => '',
83
+            'adminpass' => '',
84
+            'dbuser' => '',
85
+            'dbpass' => '',
86
+            'dbname' => '',
87
+            'dbtablespace' => '',
88
+            'dbhost' => 'localhost',
89
+            'dbtype' => '',
90
+        );
91
+        $parameters = array_merge($defaults, $post);
92 92
 
93
-		\OC_Util::addVendorScript('strengthify/jquery.strengthify');
94
-		\OC_Util::addVendorStyle('strengthify/strengthify');
95
-		\OC_Util::addScript('setup');
96
-		\OC_Template::printGuestPage('', 'installation', $parameters);
97
-	}
93
+        \OC_Util::addVendorScript('strengthify/jquery.strengthify');
94
+        \OC_Util::addVendorStyle('strengthify/strengthify');
95
+        \OC_Util::addScript('setup');
96
+        \OC_Template::printGuestPage('', 'installation', $parameters);
97
+    }
98 98
 
99
-	public function finishSetup() {
100
-		if( file_exists( $this->autoConfigFile )) {
101
-			unlink($this->autoConfigFile);
102
-		}
103
-		\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
104
-		\OC_Util::redirectToDefaultPage();
105
-	}
99
+    public function finishSetup() {
100
+        if( file_exists( $this->autoConfigFile )) {
101
+            unlink($this->autoConfigFile);
102
+        }
103
+        \OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
104
+        \OC_Util::redirectToDefaultPage();
105
+    }
106 106
 
107
-	public function loadAutoConfig($post) {
108
-		if( file_exists($this->autoConfigFile)) {
109
-			\OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO);
110
-			$AUTOCONFIG = array();
111
-			include $this->autoConfigFile;
112
-			$post = array_merge ($post, $AUTOCONFIG);
113
-		}
107
+    public function loadAutoConfig($post) {
108
+        if( file_exists($this->autoConfigFile)) {
109
+            \OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO);
110
+            $AUTOCONFIG = array();
111
+            include $this->autoConfigFile;
112
+            $post = array_merge ($post, $AUTOCONFIG);
113
+        }
114 114
 
115
-		$dbIsSet = isset($post['dbtype']);
116
-		$directoryIsSet = isset($post['directory']);
117
-		$adminAccountIsSet = isset($post['adminlogin']);
115
+        $dbIsSet = isset($post['dbtype']);
116
+        $directoryIsSet = isset($post['directory']);
117
+        $adminAccountIsSet = isset($post['adminlogin']);
118 118
 
119
-		if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
120
-			$post['install'] = 'true';
121
-		}
122
-		$post['dbIsSet'] = $dbIsSet;
123
-		$post['directoryIsSet'] = $directoryIsSet;
119
+        if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
120
+            $post['install'] = 'true';
121
+        }
122
+        $post['dbIsSet'] = $dbIsSet;
123
+        $post['directoryIsSet'] = $directoryIsSet;
124 124
 
125
-		return $post;
126
-	}
125
+        return $post;
126
+    }
127 127
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 			$post['dbpass'] = $post['dbpassword'];
61 61
 		}
62 62
 
63
-		if(isset($post['install']) AND $post['install']=='true') {
63
+		if (isset($post['install']) AND $post['install'] == 'true') {
64 64
 			// We have to launch the installation process :
65 65
 			$e = $this->setupHelper->install($post);
66 66
 			$errors = array('errors' => $e);
67 67
 
68
-			if(count($e) > 0) {
68
+			if (count($e) > 0) {
69 69
 				$options = array_merge($opts, $post, $errors);
70 70
 				$this->display($options);
71 71
 			} else {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function finishSetup() {
100
-		if( file_exists( $this->autoConfigFile )) {
100
+		if (file_exists($this->autoConfigFile)) {
101 101
 			unlink($this->autoConfigFile);
102 102
 		}
103 103
 		\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	public function loadAutoConfig($post) {
108
-		if( file_exists($this->autoConfigFile)) {
108
+		if (file_exists($this->autoConfigFile)) {
109 109
 			\OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO);
110 110
 			$AUTOCONFIG = array();
111 111
 			include $this->autoConfigFile;
112
-			$post = array_merge ($post, $AUTOCONFIG);
112
+			$post = array_merge($post, $AUTOCONFIG);
113 113
 		}
114 114
 
115 115
 		$dbIsSet = isset($post['dbtype']);
Please login to merge, or discard this patch.
core/Controller/UserController.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -29,46 +29,46 @@
 block discarded – undo
29 29
 use \OCP\IUserManager;
30 30
 
31 31
 class UserController extends Controller {
32
-	/**
33
-	 * @var IUserManager
34
-	 */
35
-	protected $userManager;
32
+    /**
33
+     * @var IUserManager
34
+     */
35
+    protected $userManager;
36 36
 
37
-	public function __construct($appName,
38
-								IRequest $request,
39
-								IUserManager $userManager
40
-	) {
41
-		parent::__construct($appName, $request);
42
-		$this->userManager = $userManager;
43
-	}
37
+    public function __construct($appName,
38
+                                IRequest $request,
39
+                                IUserManager $userManager
40
+    ) {
41
+        parent::__construct($appName, $request);
42
+        $this->userManager = $userManager;
43
+    }
44 44
 
45
-	/**
46
-	 * Lookup user display names
47
-	 *
48
-	 * @NoAdminRequired
49
-	 *
50
-	 * @param array $users
51
-	 *
52
-	 * @return JSONResponse
53
-	 */
54
-	public function getDisplayNames($users) {
55
-		$result = array();
45
+    /**
46
+     * Lookup user display names
47
+     *
48
+     * @NoAdminRequired
49
+     *
50
+     * @param array $users
51
+     *
52
+     * @return JSONResponse
53
+     */
54
+    public function getDisplayNames($users) {
55
+        $result = array();
56 56
 
57
-		foreach ($users as $user) {
58
-			$userObject = $this->userManager->get($user);
59
-			if (is_object($userObject)) {
60
-				$result[$user] = $userObject->getDisplayName();
61
-			} else {
62
-				$result[$user] = $user;
63
-			}
64
-		}
57
+        foreach ($users as $user) {
58
+            $userObject = $this->userManager->get($user);
59
+            if (is_object($userObject)) {
60
+                $result[$user] = $userObject->getDisplayName();
61
+            } else {
62
+                $result[$user] = $user;
63
+            }
64
+        }
65 65
 
66
-		$json = array(
67
-			'users' => $result,
68
-			'status' => 'success'
69
-		);
66
+        $json = array(
67
+            'users' => $result,
68
+            'status' => 'success'
69
+        );
70 70
 
71
-		return new JSONResponse($json);
71
+        return new JSONResponse($json);
72 72
 
73
-	}
73
+    }
74 74
 }
Please login to merge, or discard this patch.
core/Command/Security/RemoveCertificate.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -34,28 +34,28 @@
 block discarded – undo
34 34
 
35 35
 class RemoveCertificate extends Base {
36 36
 
37
-	/** @var ICertificateManager */
38
-	protected $certificateManager;
39
-
40
-	public function __construct(ICertificateManager $certificateManager) {
41
-		$this->certificateManager = $certificateManager;
42
-		parent::__construct();
43
-	}
44
-
45
-	protected function configure() {
46
-		$this
47
-			->setName('security:certificates:remove')
48
-			->setDescription('remove trusted certificate')
49
-			->addArgument(
50
-				'name',
51
-				InputArgument::REQUIRED,
52
-				'the file name of the certificate to remove'
53
-			);
54
-	}
55
-
56
-	protected function execute(InputInterface $input, OutputInterface $output) {
57
-		$name = $input->getArgument('name');
58
-
59
-		$this->certificateManager->removeCertificate($name);
60
-	}
37
+    /** @var ICertificateManager */
38
+    protected $certificateManager;
39
+
40
+    public function __construct(ICertificateManager $certificateManager) {
41
+        $this->certificateManager = $certificateManager;
42
+        parent::__construct();
43
+    }
44
+
45
+    protected function configure() {
46
+        $this
47
+            ->setName('security:certificates:remove')
48
+            ->setDescription('remove trusted certificate')
49
+            ->addArgument(
50
+                'name',
51
+                InputArgument::REQUIRED,
52
+                'the file name of the certificate to remove'
53
+            );
54
+    }
55
+
56
+    protected function execute(InputInterface $input, OutputInterface $output) {
57
+        $name = $input->getArgument('name');
58
+
59
+        $this->certificateManager->removeCertificate($name);
60
+    }
61 61
 }
Please login to merge, or discard this patch.
core/Command/Security/ListCertificates.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -34,64 +34,64 @@
 block discarded – undo
34 34
 
35 35
 class ListCertificates extends Base {
36 36
 
37
-	/** @var ICertificateManager */
38
-	protected $certificateManager;
39
-	/** @var IL10N */
40
-	protected $l;
37
+    /** @var ICertificateManager */
38
+    protected $certificateManager;
39
+    /** @var IL10N */
40
+    protected $l;
41 41
 
42
-	public function __construct(ICertificateManager $certificateManager, IL10N $l) {
43
-		$this->certificateManager = $certificateManager;
44
-		$this->l = $l;
45
-		parent::__construct();
46
-	}
42
+    public function __construct(ICertificateManager $certificateManager, IL10N $l) {
43
+        $this->certificateManager = $certificateManager;
44
+        $this->l = $l;
45
+        parent::__construct();
46
+    }
47 47
 
48
-	protected function configure() {
49
-		$this
50
-			->setName('security:certificates')
51
-			->setDescription('list trusted certificates');
52
-		parent::configure();
53
-	}
48
+    protected function configure() {
49
+        $this
50
+            ->setName('security:certificates')
51
+            ->setDescription('list trusted certificates');
52
+        parent::configure();
53
+    }
54 54
 
55
-	protected function execute(InputInterface $input, OutputInterface $output) {
56
-		$outputType = $input->getOption('output');
57
-		if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) {
58
-			$certificates = array_map(function (ICertificate $certificate) {
59
-				return [
60
-					'name' => $certificate->getName(),
61
-					'common_name' => $certificate->getCommonName(),
62
-					'organization' => $certificate->getOrganization(),
63
-					'expire' => $certificate->getExpireDate()->format(\DateTime::ATOM),
64
-					'issuer' => $certificate->getIssuerName(),
65
-					'issuer_organization' => $certificate->getIssuerOrganization(),
66
-					'issue_date' => $certificate->getIssueDate()->format(\DateTime::ATOM)
67
-				];
68
-			}, $this->certificateManager->listCertificates());
69
-			if ($outputType === self::OUTPUT_FORMAT_JSON) {
70
-				$output->writeln(json_encode(array_values($certificates)));
71
-			} else {
72
-				$output->writeln(json_encode(array_values($certificates), JSON_PRETTY_PRINT));
73
-			}
74
-		} else {
75
-			$table = new Table($output);
76
-			$table->setHeaders([
77
-				'File Name',
78
-				'Common Name',
79
-				'Organization',
80
-				'Valid Until',
81
-				'Issued By'
82
-			]);
55
+    protected function execute(InputInterface $input, OutputInterface $output) {
56
+        $outputType = $input->getOption('output');
57
+        if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) {
58
+            $certificates = array_map(function (ICertificate $certificate) {
59
+                return [
60
+                    'name' => $certificate->getName(),
61
+                    'common_name' => $certificate->getCommonName(),
62
+                    'organization' => $certificate->getOrganization(),
63
+                    'expire' => $certificate->getExpireDate()->format(\DateTime::ATOM),
64
+                    'issuer' => $certificate->getIssuerName(),
65
+                    'issuer_organization' => $certificate->getIssuerOrganization(),
66
+                    'issue_date' => $certificate->getIssueDate()->format(\DateTime::ATOM)
67
+                ];
68
+            }, $this->certificateManager->listCertificates());
69
+            if ($outputType === self::OUTPUT_FORMAT_JSON) {
70
+                $output->writeln(json_encode(array_values($certificates)));
71
+            } else {
72
+                $output->writeln(json_encode(array_values($certificates), JSON_PRETTY_PRINT));
73
+            }
74
+        } else {
75
+            $table = new Table($output);
76
+            $table->setHeaders([
77
+                'File Name',
78
+                'Common Name',
79
+                'Organization',
80
+                'Valid Until',
81
+                'Issued By'
82
+            ]);
83 83
 
84
-			$rows = array_map(function (ICertificate $certificate) {
85
-				return [
86
-					$certificate->getName(),
87
-					$certificate->getCommonName(),
88
-					$certificate->getOrganization(),
89
-					$this->l->l('date', $certificate->getExpireDate()),
90
-					$certificate->getIssuerName()
91
-				];
92
-			}, $this->certificateManager->listCertificates());
93
-			$table->setRows($rows);
94
-			$table->render();
95
-		}
96
-	}
84
+            $rows = array_map(function (ICertificate $certificate) {
85
+                return [
86
+                    $certificate->getName(),
87
+                    $certificate->getCommonName(),
88
+                    $certificate->getOrganization(),
89
+                    $this->l->l('date', $certificate->getExpireDate()),
90
+                    $certificate->getIssuerName()
91
+                ];
92
+            }, $this->certificateManager->listCertificates());
93
+            $table->setRows($rows);
94
+            $table->render();
95
+        }
96
+    }
97 97
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	protected function execute(InputInterface $input, OutputInterface $output) {
56 56
 		$outputType = $input->getOption('output');
57 57
 		if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) {
58
-			$certificates = array_map(function (ICertificate $certificate) {
58
+			$certificates = array_map(function(ICertificate $certificate) {
59 59
 				return [
60 60
 					'name' => $certificate->getName(),
61 61
 					'common_name' => $certificate->getCommonName(),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 				'Issued By'
82 82
 			]);
83 83
 
84
-			$rows = array_map(function (ICertificate $certificate) {
84
+			$rows = array_map(function(ICertificate $certificate) {
85 85
 				return [
86 86
 					$certificate->getName(),
87 87
 					$certificate->getCommonName(),
Please login to merge, or discard this patch.