diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 10:35:09 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 10:35:09 +0200 |
commit | 14c996d98256de958da367297c3313e0fa7ef9a8 (patch) | |
tree | 27074d5403b67cbaf59d7b7181481ebe70af5d9e /lib/private/legacy | |
parent | d6e17fb01777866674129a5883c03642f4bfd4a5 (diff) | |
download | nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.tar.gz nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.zip |
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_API.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_App.php | 16 | ||||
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_Image.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 8 | ||||
-rw-r--r-- | lib/private/legacy/template/functions.php | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php index 47590a00910..b9960c70777 100644 --- a/lib/private/legacy/OC_API.php +++ b/lib/private/legacy/OC_API.php @@ -85,7 +85,7 @@ class OC_API { if ($k[0] === '@') { $writer->writeAttribute(substr($k, 1), $v); continue; - } else if (is_numeric($k)) { + } elseif (is_numeric($k)) { $k = 'element'; } if(is_array($v)) { diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 996b7a885c6..3cc194cc03d 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -216,7 +216,7 @@ class OC_App { 'class' => $plugin['@value'], ]; \OC::$server->getCollaboratorSearch()->registerPlugin($pluginInfo); - } else if ($plugin['@attributes']['type'] === 'autocomplete-sort') { + } elseif ($plugin['@attributes']['type'] === 'autocomplete-sort') { \OC::$server->getAutoCompleteManager()->registerSorter($plugin['@value']); } } @@ -733,7 +733,7 @@ class OC_App { $info['groups'] = null; if ($enabled === 'yes') { $active = true; - } else if ($enabled === 'no') { + } elseif ($enabled === 'no') { $active = false; } else { $active = true; @@ -847,9 +847,9 @@ class OC_App { $requireMin = $appInfo['dependencies']['nextcloud']['@attributes']['min-version']; } elseif (isset($appInfo['dependencies']['owncloud']['@attributes']['min-version'])) { $requireMin = $appInfo['dependencies']['owncloud']['@attributes']['min-version']; - } else if (isset($appInfo['requiremin'])) { + } elseif (isset($appInfo['requiremin'])) { $requireMin = $appInfo['requiremin']; - } else if (isset($appInfo['require'])) { + } elseif (isset($appInfo['require'])) { $requireMin = $appInfo['require']; } @@ -857,7 +857,7 @@ class OC_App { $requireMax = $appInfo['dependencies']['nextcloud']['@attributes']['max-version']; } elseif (isset($appInfo['dependencies']['owncloud']['@attributes']['max-version'])) { $requireMax = $appInfo['dependencies']['owncloud']['@attributes']['max-version']; - } else if (isset($appInfo['requiremax'])) { + } elseif (isset($appInfo['requiremax'])) { $requireMax = $appInfo['requiremax']; } @@ -1055,7 +1055,7 @@ class OC_App { if ($attributeLang === $similarLang) { $similarLangFallback = $option['@value']; - } else if (strpos($attributeLang, $similarLang . '_') === 0) { + } elseif (strpos($attributeLang, $similarLang . '_') === 0) { if ($similarLangFallback === false) { $similarLangFallback = $option['@value']; } @@ -1067,7 +1067,7 @@ class OC_App { if ($similarLangFallback !== false) { return $similarLangFallback; - } else if ($englishFallback !== false) { + } elseif ($englishFallback !== false) { return $englishFallback; } return (string) $fallback; @@ -1090,7 +1090,7 @@ class OC_App { } if ($lang && isset($data['description']) && is_array($data['description'])) { $data['description'] = trim(self::findBestL10NOption($data['description'], $lang)); - } else if (isset($data['description']) && is_string($data['description'])) { + } elseif (isset($data['description']) && is_string($data['description'])) { $data['description'] = trim($data['description']); } else { $data['description'] = ''; diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 73154909a4a..1c4ce50f4ef 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -168,7 +168,7 @@ class OC_Helper { /** @var SplFileInfo $fileInfo */ if ($fileInfo->isLink()) { unlink($fileInfo->getPathname()); - } else if ($fileInfo->isDir()) { + } elseif ($fileInfo->isDir()) { rmdir($fileInfo->getRealPath()); } else { unlink($fileInfo->getRealPath()); diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index 7d23ece7ffa..829a9b81652 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -1078,7 +1078,7 @@ if (!function_exists('imagebmp')) { function imagebmp($im, $fileName = '', $bit = 24, $compression = 0) { if (!in_array($bit, [1, 4, 8, 16, 24, 32])) { $bit = 24; - } else if ($bit == 32) { + } elseif ($bit == 32) { $bit = 24; } $bits = pow(2, $bit); @@ -1115,7 +1115,7 @@ if (!function_exists('imagebmp')) { $bmpData .= $extra; } } // RLE8 - else if ($compression == 1 && $bit == 8) { + elseif ($compression == 1 && $bit == 8) { for ($j = $height - 1; $j >= 0; $j--) { $lastIndex = "\0"; $sameNum = 0; diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 4d7d00f5dc2..9322ef07a79 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -189,7 +189,7 @@ class OC_Util { // If we are not forced to load a specific user we load the one that is logged in if ($user === null) { $user = ''; - } else if ($user == "" && \OC::$server->getUserSession()->isLoggedIn()) { + } elseif ($user == "" && \OC::$server->getUserSession()->isLoggedIn()) { $user = OC_User::getUser(); } @@ -788,7 +788,7 @@ class OC_Util { [$urlGenerator->linkToDocs('admin-dir_permissions')]) ]; } - } else if (!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) { + } elseif (!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) { // is_writable doesn't work for NFS mounts, so try to write a file and check if it exists. $testFile = sprintf('%s/%s.tmp', $CONFIG_DATADIRECTORY, uniqid('data_dir_writability_test_')); $handle = fopen($testFile, 'w'); @@ -1421,7 +1421,7 @@ class OC_Util { $versionDiff = version_compare($currentVersion, $installedVersion); if ($versionDiff > 0) { return true; - } else if ($config->getValue('debug', false) && $versionDiff < 0) { + } elseif ($config->getValue('debug', false) && $versionDiff < 0) { // downgrade with debug $installedMajor = explode('.', $installedVersion); $installedMajor = $installedMajor[0] . '.' . $installedMajor[1]; @@ -1434,7 +1434,7 @@ class OC_Util { // downgrade attempt, throw exception throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } - } else if ($versionDiff < 0) { + } elseif ($versionDiff < 0) { // downgrade attempt, throw exception throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index e42ef796f0f..83751db1e31 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -81,7 +81,7 @@ function emit_script_tag($src, $script_content='') { if (!empty($src)) { // emit script tag for deferred loading from $src $s.=$defer_str.' src="' . $src .'">'; - } else if (!empty($script_content)) { + } elseif (!empty($script_content)) { // emit script tag for inline script from $script_content without defer (see MDN) $s.=">\n".$script_content."\n"; } else { |