diff options
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/Command/ListCommand.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Notify.php | 14 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/OwnCloud.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/Swift.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Service/LegacyStoragesService.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Service/StoragesService.php | 2 |
10 files changed, 19 insertions, 19 deletions
diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index dbb309f3a2c..6fa493a6598 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -125,7 +125,7 @@ class ListCommand extends Base { } else { if ($userId === self::ALL) { $output->writeln("<info>No mounts configured</info>"); - } else if ($userId) { + } elseif ($userId) { $output->writeln("<info>No mounts configured by $userId</info>"); } else { $output->writeln("<info>No admin mounts configured</info>"); diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 84966b4ee7b..6b83c570c67 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -105,16 +105,16 @@ class Notify extends Base { if ($input->getOption('user')) { $mount->setBackendOption('user', $input->getOption('user')); - } else if (isset($_ENV['NOTIFY_USER'])) { + } elseif (isset($_ENV['NOTIFY_USER'])) { $mount->setBackendOption('user', $_ENV['NOTIFY_USER']); - } else if (isset($_SERVER['NOTIFY_USER'])) { + } elseif (isset($_SERVER['NOTIFY_USER'])) { $mount->setBackendOption('user', $_SERVER['NOTIFY_USER']); } if ($input->getOption('password')) { $mount->setBackendOption('password', $input->getOption('password')); - } else if (isset($_ENV['NOTIFY_PASSWORD'])) { + } elseif (isset($_ENV['NOTIFY_PASSWORD'])) { $mount->setBackendOption('password', $_ENV['NOTIFY_PASSWORD']); - } else if (isset($_SERVER['NOTIFY_PASSWORD'])) { + } elseif (isset($_SERVER['NOTIFY_PASSWORD'])) { $mount->setBackendOption('password', $_SERVER['NOTIFY_PASSWORD']); } @@ -280,16 +280,16 @@ class Notify extends Base { foreach ($changes as $change) { if ($change->getPath() === '/.nc_test_file.txt' || $change->getPath() === '.nc_test_file.txt') { $foundRootChange = true; - } else if ($change->getPath() === '/.nc_test_folder/subfile.txt' || $change->getPath() === '.nc_test_folder/subfile.txt') { + } elseif ($change->getPath() === '/.nc_test_folder/subfile.txt' || $change->getPath() === '.nc_test_folder/subfile.txt') { $foundSubfolderChange = true; } } if ($foundRootChange && $foundSubfolderChange && $verbose) { $output->writeln('<info>Self-test successful</info>'); - } else if ($foundRootChange && !$foundSubfolderChange) { + } elseif ($foundRootChange && !$foundSubfolderChange) { $output->writeln('<error>Error while running self-test, change is subfolder not detected</error>'); - } else if (!$foundRootChange) { + } elseif (!$foundRootChange) { $output->writeln('<error>Error while running self-test, no changes detected</error>'); } } diff --git a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php index b456f03c34d..15628ec965b 100644 --- a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php +++ b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php @@ -55,7 +55,7 @@ class SMBNotifyHandler implements INotifyHandler { private function relativePath($fullPath) { if ($fullPath === $this->root) { return ''; - } else if (substr($fullPath, 0, strlen($this->root)) === $this->root) { + } elseif (substr($fullPath, 0, strlen($this->root)) === $this->root) { return substr($fullPath, strlen($this->root)); } else { return null; diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index b8155e28661..99cfcb594a9 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -200,7 +200,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { if (isset($storages[$this->id]) && isset($storages[$oldId])) { // if both ids exist, delete the old storage and corresponding filecache entries \OC\Files\Cache\Storage::remove($oldId); - } else if (isset($storages[$oldId])) { + } elseif (isset($storages[$oldId])) { // if only the old id exists do an update $stmt = \OC::$server->getDatabaseConnection()->prepare( 'UPDATE `*PREFIX*storages` SET `id` = ? WHERE `id` = ?' @@ -221,7 +221,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $fileType = $this->filetype($path); if ($fileType === 'dir') { return $this->rmdir($path); - } else if ($fileType === 'file') { + } elseif ($fileType === 'file') { return $this->unlink($path); } else { return false; diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php index 966874e947a..1738aacd258 100644 --- a/apps/files_external/lib/Lib/Storage/OwnCloud.php +++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php @@ -49,7 +49,7 @@ class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorag if (substr($host, 0, 8) === "https://") { $host = substr($host, 8); $params['secure'] = true; - } else if (substr($host, 0, 7) === "http://") { + } elseif (substr($host, 0, 7) === "http://") { $host = substr($host, 7); $params['secure'] = false; } diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index ee848889c39..9682ebd4535 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -72,7 +72,7 @@ class SFTP extends \OC\Files\Storage\Common { $parsed = parse_url($host); if(is_array($parsed) && isset($parsed['port'])) { return [$parsed['host'], $parsed['port']]; - } else if (is_array($parsed)) { + } elseif (is_array($parsed)) { return [$parsed['host'], 22]; } else { return [$input, 22]; diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 9cca8b72210..506774d5cea 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -96,7 +96,7 @@ class SMB extends Common implements INotifyStorage { if (isset($params['auth'])) { $auth = $params['auth']; - } else if (isset($params['user']) && isset($params['password']) && isset($params['share'])) { + } elseif (isset($params['user']) && isset($params['password']) && isset($params['share'])) { list($workgroup, $user) = $this->splitUser($params['user']); $auth = new BasicAuth($user, $workgroup, $params['password']); } else { @@ -161,7 +161,7 @@ class SMB extends Common implements INotifyStorage { protected function relativePath($fullPath) { if ($fullPath === $this->root) { return ''; - } else if (substr($fullPath, 0, strlen($this->root)) === $this->root) { + } elseif (substr($fullPath, 0, strlen($this->root)) === $this->root) { return substr($fullPath, strlen($this->root)); } else { return null; diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 5a4b607bb6b..a928f5b75d9 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -324,7 +324,7 @@ class Swift extends \OC\Files\Storage\Common { if ($path === '.') { $path = ''; - } else if ($this->is_dir($path)) { + } elseif ($this->is_dir($path)) { $path .= '/'; } @@ -506,7 +506,7 @@ class Swift extends \OC\Files\Storage\Common { return false; } - } else if ($fileType === 'dir') { + } elseif ($fileType === 'dir') { try { $source = $this->fetchObject($path1 . '/'); $source->copy([ diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php index 7818571c3d7..95807f0e53f 100644 --- a/apps/files_external/lib/Service/LegacyStoragesService.php +++ b/apps/files_external/lib/Service/LegacyStoragesService.php @@ -88,7 +88,7 @@ abstract class LegacyStoragesService { $applicableUsers[] = $applicable; $storageConfig->setApplicableUsers($applicableUsers); } - } else if ($mountType === \OC_Mount_Config::MOUNT_TYPE_GROUP) { + } elseif ($mountType === \OC_Mount_Config::MOUNT_TYPE_GROUP) { $applicableGroups = $storageConfig->getApplicableGroups(); $applicableGroups[] = $applicable; $storageConfig->setApplicableGroups($applicableGroups); diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index 60ccec13206..b348a0964ad 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -420,7 +420,7 @@ abstract class StoragesService { if ($wasGlobal && !$isGlobal) { $this->dbConfig->removeApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); - } else if (!$wasGlobal && $isGlobal) { + } elseif (!$wasGlobal && $isGlobal) { $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); } |