diff options
Diffstat (limited to 'apps/files_external/lib/Lib')
19 files changed, 23 insertions, 23 deletions
diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php index dbf14b76da8..7da3458e54d 100644 --- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php +++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php @@ -39,7 +39,7 @@ class AccessKey extends AuthMechanism { ->setScheme(self::SCHEME_AMAZONS3_ACCESSKEY) ->setText($l->t('Access key')) ->addParameters([ - (new DefinitionParameter('key', $l->t('Access key'))), + new DefinitionParameter('key', $l->t('Access key')), (new DefinitionParameter('secret', $l->t('Secret key'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]); diff --git a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php index 2602d5de41b..6a95710b3ef 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php +++ b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php @@ -39,7 +39,7 @@ class OAuth1 extends AuthMechanism { ->addParameters([ (new DefinitionParameter('configured', 'configured')) ->setType(DefinitionParameter::VALUE_HIDDEN), - (new DefinitionParameter('app_key', $l->t('App key'))), + new DefinitionParameter('app_key', $l->t('App key')), (new DefinitionParameter('app_secret', $l->t('App secret'))) ->setType(DefinitionParameter::VALUE_PASSWORD), (new DefinitionParameter('token', 'token')) diff --git a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php index 325efb0e1a0..a5317ae9fa6 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php +++ b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php @@ -39,7 +39,7 @@ class OAuth2 extends AuthMechanism { ->addParameters([ (new DefinitionParameter('configured', 'configured')) ->setType(DefinitionParameter::VALUE_HIDDEN), - (new DefinitionParameter('client_id', $l->t('Client ID'))), + new DefinitionParameter('client_id', $l->t('Client ID')), (new DefinitionParameter('client_secret', $l->t('Client secret'))) ->setType(DefinitionParameter::VALUE_PASSWORD), (new DefinitionParameter('token', 'token')) diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php index 17c2c8bd146..ca1e0a08ae9 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php @@ -37,11 +37,11 @@ class OpenStack extends AuthMechanism { ->setScheme(self::SCHEME_OPENSTACK) ->setText($l->t('OpenStack')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('password', $l->t('Password'))) ->setType(DefinitionParameter::VALUE_PASSWORD), - (new DefinitionParameter('tenant', $l->t('Tenant name'))), - (new DefinitionParameter('url', $l->t('Identity endpoint URL'))), + new DefinitionParameter('tenant', $l->t('Tenant name')), + new DefinitionParameter('url', $l->t('Identity endpoint URL')), ]) ; } diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php index caff8e26ae3..14398c1ad82 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php @@ -37,7 +37,7 @@ class Rackspace extends AuthMechanism { ->setScheme(self::SCHEME_OPENSTACK) ->setText($l->t('Rackspace')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('key', $l->t('API key'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]) diff --git a/apps/files_external/lib/Lib/Auth/Password/Password.php b/apps/files_external/lib/Lib/Auth/Password/Password.php index cf8d6b9f458..95a10ebb1d9 100644 --- a/apps/files_external/lib/Lib/Auth/Password/Password.php +++ b/apps/files_external/lib/Lib/Auth/Password/Password.php @@ -37,7 +37,7 @@ class Password extends AuthMechanism { ->setScheme(self::SCHEME_PASSWORD) ->setText($l->t('Username and password')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('password', $l->t('Password'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]); diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 425a601d7e9..25c4a1767e9 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -47,8 +47,8 @@ class RSA extends AuthMechanism { ->setScheme(self::SCHEME_PUBLICKEY) ->setText($l->t('RSA public key')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), - (new DefinitionParameter('public_key', $l->t('Public key'))), + new DefinitionParameter('user', $l->t('Username')), + new DefinitionParameter('public_key', $l->t('Public key')), (new DefinitionParameter('private_key', 'private_key')) ->setType(DefinitionParameter::VALUE_HIDDEN), ]) diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index 5625805601c..d21794a6847 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -42,7 +42,7 @@ class AmazonS3 extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\AmazonS3') ->setText($l->t('Amazon S3')) ->addParameters([ - (new DefinitionParameter('bucket', $l->t('Bucket'))), + new DefinitionParameter('bucket', $l->t('Bucket')), (new DefinitionParameter('hostname', $l->t('Hostname'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('port', $l->t('Port'))) diff --git a/apps/files_external/lib/Lib/Backend/DAV.php b/apps/files_external/lib/Lib/Backend/DAV.php index a8053f81d36..95d804ba943 100644 --- a/apps/files_external/lib/Lib/Backend/DAV.php +++ b/apps/files_external/lib/Lib/Backend/DAV.php @@ -42,7 +42,7 @@ class DAV extends Backend { ->setStorageClass('\OC\Files\Storage\DAV') ->setText($l->t('WebDAV')) ->addParameters([ - (new DefinitionParameter('host', $l->t('URL'))), + new DefinitionParameter('host', $l->t('URL')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index edb8884f595..12aee8114f3 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -42,7 +42,7 @@ class FTP extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\FTP') ->setText($l->t('FTP')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure ftps://'))) diff --git a/apps/files_external/lib/Lib/Backend/Local.php b/apps/files_external/lib/Lib/Backend/Local.php index 298b0af1c7a..528528f2923 100644 --- a/apps/files_external/lib/Lib/Backend/Local.php +++ b/apps/files_external/lib/Lib/Backend/Local.php @@ -38,7 +38,7 @@ class Local extends Backend { ->setStorageClass('\OC\Files\Storage\Local') ->setText($l->t('Local')) ->addParameters([ - (new DefinitionParameter('datadir', $l->t('Location'))), + new DefinitionParameter('datadir', $l->t('Location')), ]) ->setAllowedVisibility(BackendService::VISIBILITY_ADMIN) ->setPriority(BackendService::PRIORITY_DEFAULT + 50) diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php index 0d3ffb30b40..7dcd1f27212 100644 --- a/apps/files_external/lib/Lib/Backend/OwnCloud.php +++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php @@ -40,7 +40,7 @@ class OwnCloud extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud') ->setText($l->t('Nextcloud')) ->addParameters([ - (new DefinitionParameter('host', $l->t('URL'))), + new DefinitionParameter('host', $l->t('URL')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) diff --git a/apps/files_external/lib/Lib/Backend/SFTP.php b/apps/files_external/lib/Lib/Backend/SFTP.php index c9b31272999..561e0496083 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP.php +++ b/apps/files_external/lib/Lib/Backend/SFTP.php @@ -36,7 +36,7 @@ class SFTP extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SFTP') ->setText($l->t('SFTP')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Root'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Backend/SFTP_Key.php b/apps/files_external/lib/Lib/Backend/SFTP_Key.php index 80ac1ceecc4..62f108cd9dd 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP_Key.php +++ b/apps/files_external/lib/Lib/Backend/SFTP_Key.php @@ -38,7 +38,7 @@ class SFTP_Key extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SFTP') ->setText($l->t('SFTP with secret key login')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index c4aadbd13f6..38e386005ad 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -44,8 +44,8 @@ class SMB extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB') ->setText($l->t('SMB / CIFS')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), - (new DefinitionParameter('share', $l->t('Share'))), + new DefinitionParameter('host', $l->t('Host')), + new DefinitionParameter('share', $l->t('Share')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('domain', $l->t('Domain'))) diff --git a/apps/files_external/lib/Lib/Backend/SMB_OC.php b/apps/files_external/lib/Lib/Backend/SMB_OC.php index 76126fd649f..54d941ff1db 100644 --- a/apps/files_external/lib/Lib/Backend/SMB_OC.php +++ b/apps/files_external/lib/Lib/Backend/SMB_OC.php @@ -46,7 +46,7 @@ class SMB_OC extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB') ->setText($l->t('SMB / CIFS using OC login')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('username_as_share', $l->t('Username as share'))) ->setType(DefinitionParameter::VALUE_BOOLEAN), (new DefinitionParameter('share', $l->t('Share'))) diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index 52ed66b95ae..b0a69ae51e0 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -46,7 +46,7 @@ class Swift extends Backend { ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('region', $l->t('Region'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), - (new DefinitionParameter('bucket', $l->t('Bucket'))), + new DefinitionParameter('bucket', $l->t('Bucket')), (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index 427a076ffe1..17afb1fcf95 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -150,7 +150,7 @@ class FTP extends StreamWrapper{ */ public static function checkDependencies() { if (function_exists('ftp_login')) { - return(true); + return true; } else { return array('ftp'); } diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index aeedd3dcd63..aaa7e95bbdf 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -170,7 +170,7 @@ class Swift extends \OC\Files\Storage\Common { $bucketUrl = Url::factory($params['bucket']); if ($bucketUrl->isAbsolute()) { - $this->bucket = end(($bucketUrl->getPathSegments())); + $this->bucket = end($bucketUrl->getPathSegments()); $params['endpoint_url'] = $bucketUrl->addPath('..')->normalizePath(); } else { $this->bucket = $params['bucket']; |