@@ -240,12 +240,12 @@ discard block |
||
240 | 240 | return StorageNotAvailableException::STATUS_SUCCESS; |
241 | 241 | } |
242 | 242 | foreach ($options as $key => &$option) { |
243 | - if($key === 'password') { |
|
243 | + if ($key === 'password') { |
|
244 | 244 | // no replacements in passwords |
245 | 245 | continue; |
246 | 246 | } |
247 | 247 | $option = self::substitutePlaceholdersInConfig($option); |
248 | - if(!self::arePlaceholdersSubstituted($option)) { |
|
248 | + if (!self::arePlaceholdersSubstituted($option)) { |
|
249 | 249 | \OC::$server->getLogger()->error( |
250 | 250 | 'A placeholder was not substituted: {option} for mount type {class}', |
251 | 251 | [ |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | |
286 | 286 | public static function arePlaceholdersSubstituted($option):bool { |
287 | 287 | $result = true; |
288 | - if(is_array($option)) { |
|
288 | + if (is_array($option)) { |
|
289 | 289 | foreach ($option as $optionItem) { |
290 | 290 | $result = $result && self::arePlaceholdersSubstituted($optionItem); |
291 | 291 | } |
@@ -305,11 +305,11 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public static function readData($user = null) { |
307 | 307 | if (isset($user)) { |
308 | - $jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json'; |
|
308 | + $jsonFile = \OC::$server->getUserManager()->get($user)->getHome().'/mount.json'; |
|
309 | 309 | } else { |
310 | 310 | $config = \OC::$server->getConfig(); |
311 | - $datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/'); |
|
312 | - $jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json'); |
|
311 | + $datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data/'); |
|
312 | + $jsonFile = $config->getSystemValue('mount_file', $datadir.'/mount.json'); |
|
313 | 313 | } |
314 | 314 | if (is_file($jsonFile)) { |
315 | 315 | $mountPoints = json_decode(file_get_contents($jsonFile), true); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | foreach ($backends as $backend) { |
336 | 336 | foreach ($backend->checkDependencies() as $dependency) { |
337 | 337 | if ($message = $dependency->getMessage()) { |
338 | - $message .= '<p>' . $message . '</p>'; |
|
338 | + $message .= '<p>'.$message.'</p>'; |
|
339 | 339 | } else { |
340 | 340 | $dependencyGroups[$dependency->getDependency()][] = $backend; |
341 | 341 | } |
@@ -344,9 +344,9 @@ discard block |
||
344 | 344 | |
345 | 345 | foreach ($dependencyGroups as $module => $dependants) { |
346 | 346 | $backends = implode(', ', array_map(function($backend) { |
347 | - return '"' . $backend->getText() . '"'; |
|
347 | + return '"'.$backend->getText().'"'; |
|
348 | 348 | }, $dependants)); |
349 | - $message .= '<p>' . OC_Mount_Config::getSingleDependencyMessage($l, $module, $backends) . '</p>'; |
|
349 | + $message .= '<p>'.OC_Mount_Config::getSingleDependencyMessage($l, $module, $backends).'</p>'; |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | return $message; |
@@ -363,11 +363,11 @@ discard block |
||
363 | 363 | private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) { |
364 | 364 | switch (strtolower($module)) { |
365 | 365 | case 'curl': |
366 | - return (string)$l->t('The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]); |
|
366 | + return (string) $l->t('The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]); |
|
367 | 367 | case 'ftp': |
368 | - return (string)$l->t('The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]); |
|
368 | + return (string) $l->t('The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]); |
|
369 | 369 | default: |
370 | - return (string)$l->t('"%1$s" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it.', [$module, $backend]); |
|
370 | + return (string) $l->t('"%1$s" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it.', [$module, $backend]); |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $cipher = self::getCipher(); |
413 | 413 | $iv = \OC::$server->getSecureRandom()->generate(16); |
414 | 414 | $cipher->setIV($iv); |
415 | - return base64_encode($iv . $cipher->encrypt($password)); |
|
415 | + return base64_encode($iv.$cipher->encrypt($password)); |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | /** |