diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /apps/files_external/lib/Lib | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/files_external/lib/Lib')
-rw-r--r-- | apps/files_external/lib/Lib/Auth/AuthMechanism.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/Backend.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/LegacyBackend.php | 24 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 7 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 3 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/Swift.php | 2 |
6 files changed, 20 insertions, 24 deletions
diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php index e43f6d06b47..5ef5f78acd9 100644 --- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php +++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php @@ -26,11 +26,11 @@ namespace OCA\Files_External\Lib\Auth; use OCA\Files_External\Lib\FrontendDefinitionTrait; use OCA\Files_External\Lib\IdentifierTrait; +use OCA\Files_External\Lib\IFrontendDefinition; +use OCA\Files_External\Lib\IIdentifier; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Lib\StorageModifierTrait; use OCA\Files_External\Lib\VisibilityTrait; -use OCA\Files_External\Lib\IIdentifier; -use OCA\Files_External\Lib\IFrontendDefinition; /** * Authentication mechanism diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php index d0058e98b52..48f46b8f55a 100644 --- a/apps/files_external/lib/Lib/Backend/Backend.php +++ b/apps/files_external/lib/Lib/Backend/Backend.php @@ -26,12 +26,12 @@ use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\DependencyTrait; use OCA\Files_External\Lib\FrontendDefinitionTrait; use OCA\Files_External\Lib\IdentifierTrait; +use OCA\Files_External\Lib\IFrontendDefinition; +use OCA\Files_External\Lib\IIdentifier; use OCA\Files_External\Lib\PriorityTrait; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Lib\StorageModifierTrait; use OCA\Files_External\Lib\VisibilityTrait; -use OCA\Files_External\Lib\IIdentifier; -use OCA\Files_External\Lib\IFrontendDefinition; use OCP\Files\Storage\IStorage; /** diff --git a/apps/files_external/lib/Lib/Backend/LegacyBackend.php b/apps/files_external/lib/Lib/Backend/LegacyBackend.php index d00c5b0e944..86c21f03434 100644 --- a/apps/files_external/lib/Lib/Backend/LegacyBackend.php +++ b/apps/files_external/lib/Lib/Backend/LegacyBackend.php @@ -61,18 +61,18 @@ class LegacyBackend extends Backend { $placeholder = substr($placeholder, 1); } switch ($placeholder[0]) { - case '!': - $type = DefinitionParameter::VALUE_BOOLEAN; - $placeholder = substr($placeholder, 1); - break; - case '*': - $type = DefinitionParameter::VALUE_PASSWORD; - $placeholder = substr($placeholder, 1); - break; - case '#': - $type = DefinitionParameter::VALUE_HIDDEN; - $placeholder = substr($placeholder, 1); - break; + case '!': + $type = DefinitionParameter::VALUE_BOOLEAN; + $placeholder = substr($placeholder, 1); + break; + case '*': + $type = DefinitionParameter::VALUE_PASSWORD; + $placeholder = substr($placeholder, 1); + break; + case '#': + $type = DefinitionParameter::VALUE_HIDDEN; + $placeholder = substr($placeholder, 1); + break; } $this->addParameter((new DefinitionParameter($name, $placeholder)) ->setType($type) diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 8e2a6b8ea12..e5fa98313d5 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -39,22 +39,19 @@ */ namespace OCA\Files_External\Lib\Storage; -use Aws\Result; use Aws\S3\Exception\S3Exception; -use Aws\S3\S3Client; use Icewind\Streams\CallbackWrapper; use Icewind\Streams\IteratorDirectory; -use OCP\Cache\CappedMemoryCache; use OC\Files\Cache\CacheEntry; use OC\Files\ObjectStore\S3ConnectionTrait; use OC\Files\ObjectStore\S3ObjectTrait; +use OCP\Cache\CappedMemoryCache; use OCP\Constants; use OCP\Files\FileInfo; use OCP\Files\IMimeTypeDetector; +use OCP\ICache; use OCP\ICacheFactory; -use OCP\IMemcache; use OCP\Server; -use OCP\ICache; use Psr\Log\LoggerInterface; class AmazonS3 extends \OC\Files\Storage\Common { diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 5c4dcca65ce..3fa04209fa0 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -39,7 +39,6 @@ namespace OCA\Files_External\Lib\Storage; use Icewind\Streams\CountWrapper; use Icewind\Streams\IteratorDirectory; use Icewind\Streams\RetryWrapper; -use OC\Files\Filesystem; use OC\Files\Storage\Common; use OCP\Constants; use OCP\Files\FileInfo; @@ -64,7 +63,7 @@ class SFTP extends Common { protected $client; private IMimeTypeDetector $mimeTypeDetector; - const COPY_CHUNK_SIZE = 8 * 1024 * 1024; + public const COPY_CHUNK_SIZE = 8 * 1024 * 1024; /** * @param string $host protocol://server:port diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 26e6c5315cb..19c83b29bc8 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -296,7 +296,7 @@ class Swift extends \OC\Files\Storage\Common { $path .= '/'; } -// $path = str_replace('%23', '#', $path); // the prefix is sent as a query param, so revert the encoding of # + // $path = str_replace('%23', '#', $path); // the prefix is sent as a query param, so revert the encoding of # try { $files = []; |