Passed
Push — master ( 8c07b6...d458fc )
by Blizzz
23:57 queued 12s
created
lib/private/Template/JSConfigHelper.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		$defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
153 153
 		$defaultExpireDate = $enforceDefaultExpireDate = null;
154 154
 		if ($defaultExpireDateEnabled) {
155
-			$defaultExpireDate = (int)$this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
155
+			$defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
156 156
 			$enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
157 157
 		}
158 158
 		$outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
 		$defaultInternalExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no') === 'yes';
161 161
 		$defaultInternalExpireDate = $defaultInternalExpireDateEnforced = null;
162 162
 		if ($defaultInternalExpireDateEnabled) {
163
-			$defaultInternalExpireDate = (int)$this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7');
163
+			$defaultInternalExpireDate = (int) $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7');
164 164
 			$defaultInternalExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_internal_enforce_expire_date', 'no') === 'yes';
165 165
 		}
166 166
 
167 167
 		$countOfDataLocation = 0;
168
-		$dataLocation = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
168
+		$dataLocation = str_replace(\OC::$SERVERROOT.'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation);
169 169
 		if ($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) {
170 170
 			$dataLocation = false;
171 171
 		}
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
 			'enable_avatars' => true, // here for legacy reasons - to not crash existing code that relies on this value
191 191
 			'lost_password_link' => $this->config->getSystemValue('lost_password_link', null),
192 192
 			'modRewriteWorking' => $this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true',
193
-			'sharing.maxAutocompleteResults' => (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0),
194
-			'sharing.minSearchStringLength' => (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0),
193
+			'sharing.maxAutocompleteResults' => (int) $this->config->getSystemValue('sharing.maxAutocompleteResults', 0),
194
+			'sharing.minSearchStringLength' => (int) $this->config->getSystemValue('sharing.minSearchStringLength', 0),
195 195
 			'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX,
196 196
 		];
197 197
 
@@ -199,66 +199,66 @@  discard block
 block discarded – undo
199 199
 			"_oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
200 200
 			"_oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
201 201
 			"backendAllowsPasswordConfirmation" => $userBackendAllowsPasswordConfirmation ? 'true' : 'false',
202
-			"oc_dataURL" => is_string($dataLocation) ? "\"" . $dataLocation . "\"" : 'false',
203
-			"_oc_webroot" => "\"" . \OC::$WEBROOT . "\"",
202
+			"oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
203
+			"_oc_webroot" => "\"".\OC::$WEBROOT."\"",
204 204
 			"_oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
205 205
 			"datepickerFormatDate" => json_encode($this->l->l('jsdate', null)),
206 206
 			'nc_lastLogin' => $lastConfirmTimestamp,
207 207
 			'nc_pageLoad' => time(),
208 208
 			"dayNames" => json_encode([
209
-				(string)$this->l->t('Sunday'),
210
-				(string)$this->l->t('Monday'),
211
-				(string)$this->l->t('Tuesday'),
212
-				(string)$this->l->t('Wednesday'),
213
-				(string)$this->l->t('Thursday'),
214
-				(string)$this->l->t('Friday'),
215
-				(string)$this->l->t('Saturday')
209
+				(string) $this->l->t('Sunday'),
210
+				(string) $this->l->t('Monday'),
211
+				(string) $this->l->t('Tuesday'),
212
+				(string) $this->l->t('Wednesday'),
213
+				(string) $this->l->t('Thursday'),
214
+				(string) $this->l->t('Friday'),
215
+				(string) $this->l->t('Saturday')
216 216
 			]),
217 217
 			"dayNamesShort" => json_encode([
218
-				(string)$this->l->t('Sun.'),
219
-				(string)$this->l->t('Mon.'),
220
-				(string)$this->l->t('Tue.'),
221
-				(string)$this->l->t('Wed.'),
222
-				(string)$this->l->t('Thu.'),
223
-				(string)$this->l->t('Fri.'),
224
-				(string)$this->l->t('Sat.')
218
+				(string) $this->l->t('Sun.'),
219
+				(string) $this->l->t('Mon.'),
220
+				(string) $this->l->t('Tue.'),
221
+				(string) $this->l->t('Wed.'),
222
+				(string) $this->l->t('Thu.'),
223
+				(string) $this->l->t('Fri.'),
224
+				(string) $this->l->t('Sat.')
225 225
 			]),
226 226
 			"dayNamesMin" => json_encode([
227
-				(string)$this->l->t('Su'),
228
-				(string)$this->l->t('Mo'),
229
-				(string)$this->l->t('Tu'),
230
-				(string)$this->l->t('We'),
231
-				(string)$this->l->t('Th'),
232
-				(string)$this->l->t('Fr'),
233
-				(string)$this->l->t('Sa')
227
+				(string) $this->l->t('Su'),
228
+				(string) $this->l->t('Mo'),
229
+				(string) $this->l->t('Tu'),
230
+				(string) $this->l->t('We'),
231
+				(string) $this->l->t('Th'),
232
+				(string) $this->l->t('Fr'),
233
+				(string) $this->l->t('Sa')
234 234
 			]),
235 235
 			"monthNames" => json_encode([
236
-				(string)$this->l->t('January'),
237
-				(string)$this->l->t('February'),
238
-				(string)$this->l->t('March'),
239
-				(string)$this->l->t('April'),
240
-				(string)$this->l->t('May'),
241
-				(string)$this->l->t('June'),
242
-				(string)$this->l->t('July'),
243
-				(string)$this->l->t('August'),
244
-				(string)$this->l->t('September'),
245
-				(string)$this->l->t('October'),
246
-				(string)$this->l->t('November'),
247
-				(string)$this->l->t('December')
236
+				(string) $this->l->t('January'),
237
+				(string) $this->l->t('February'),
238
+				(string) $this->l->t('March'),
239
+				(string) $this->l->t('April'),
240
+				(string) $this->l->t('May'),
241
+				(string) $this->l->t('June'),
242
+				(string) $this->l->t('July'),
243
+				(string) $this->l->t('August'),
244
+				(string) $this->l->t('September'),
245
+				(string) $this->l->t('October'),
246
+				(string) $this->l->t('November'),
247
+				(string) $this->l->t('December')
248 248
 			]),
249 249
 			"monthNamesShort" => json_encode([
250
-				(string)$this->l->t('Jan.'),
251
-				(string)$this->l->t('Feb.'),
252
-				(string)$this->l->t('Mar.'),
253
-				(string)$this->l->t('Apr.'),
254
-				(string)$this->l->t('May.'),
255
-				(string)$this->l->t('Jun.'),
256
-				(string)$this->l->t('Jul.'),
257
-				(string)$this->l->t('Aug.'),
258
-				(string)$this->l->t('Sep.'),
259
-				(string)$this->l->t('Oct.'),
260
-				(string)$this->l->t('Nov.'),
261
-				(string)$this->l->t('Dec.')
250
+				(string) $this->l->t('Jan.'),
251
+				(string) $this->l->t('Feb.'),
252
+				(string) $this->l->t('Mar.'),
253
+				(string) $this->l->t('Apr.'),
254
+				(string) $this->l->t('May.'),
255
+				(string) $this->l->t('Jun.'),
256
+				(string) $this->l->t('Jul.'),
257
+				(string) $this->l->t('Aug.'),
258
+				(string) $this->l->t('Sep.'),
259
+				(string) $this->l->t('Oct.'),
260
+				(string) $this->l->t('Nov.'),
261
+				(string) $this->l->t('Dec.')
262 262
 			]),
263 263
 			"firstDay" => json_encode($this->l->l('firstday', null)),
264 264
 			"_oc_config" => json_encode($config),
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 		if ($this->currentUser !== null) {
300 300
 			$array['oc_userconfig'] = json_encode([
301 301
 				'avatar' => [
302
-					'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0),
302
+					'version' => (int) $this->config->getUserValue($uid, 'avatar', 'version', 0),
303 303
 					'generated' => $this->config->getUserValue($uid, 'avatar', 'generated', 'true') === 'true',
304 304
 				]
305 305
 			]);
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
 		// Echo it
316 316
 		foreach ($array as  $setting => $value) {
317
-			$result .= 'var '. $setting . '='. $value . ';' . PHP_EOL;
317
+			$result .= 'var '.$setting.'='.$value.';'.PHP_EOL;
318 318
 		}
319 319
 
320 320
 		return $result;
Please login to merge, or discard this patch.