diff options
Diffstat (limited to 'apps/files_external')
28 files changed, 60 insertions, 60 deletions
diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php index 8dfbf396a20..0e28d2bf79f 100644 --- a/apps/files_external/lib/Command/Applicable.php +++ b/apps/files_external/lib/Command/Applicable.php @@ -51,7 +51,7 @@ class Applicable extends Base { */ private $groupManager; - function __construct( + public function __construct( GlobalStoragesService $globalService, IUserManager $userManager, IGroupManager $groupManager diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php index 5618b3fd16d..3e51f6d3b08 100644 --- a/apps/files_external/lib/Command/Backends.php +++ b/apps/files_external/lib/Command/Backends.php @@ -35,7 +35,7 @@ class Backends extends Base { /** @var BackendService */ private $backendService; - function __construct(BackendService $backendService + public function __construct(BackendService $backendService ) { parent::__construct(); diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index f58b1561e68..a42689ddec1 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -38,7 +38,7 @@ class Config extends Base { */ protected $globalService; - function __construct(GlobalStoragesService $globalService) { + public function __construct(GlobalStoragesService $globalService) { parent::__construct(); $this->globalService = $globalService; } diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 7926da60b9e..a094ff49572 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -64,7 +64,7 @@ class Create extends Base { /** @var IUserSession */ private $userSession; - function __construct(GlobalStoragesService $globalService, + public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserManager $userManager, IUserSession $userSession, diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index 21f4217445d..f8bef4c79ac 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -58,7 +58,7 @@ class Delete extends Base { */ protected $userManager; - function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { + public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { parent::__construct(); $this->globalService = $globalService; $this->userService = $userService; diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index e006bb9f560..a1f61bd9f1d 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -66,7 +66,7 @@ class Import extends Base { /** @var BackendService */ private $backendService; - function __construct(GlobalStoragesService $globalService, + public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager, diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index 6fa493a6598..b238b33f6a4 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -58,9 +58,9 @@ class ListCommand extends Base { */ protected $userManager; - const ALL = -1; + public const ALL = -1; - function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { + public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { parent::__construct(); $this->globalService = $globalService; $this->userService = $userService; diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 6b83c570c67..96b39de6e1e 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -52,7 +52,7 @@ class Notify extends Base { /** @var ILogger */ private $logger; - function __construct(GlobalStoragesService $globalService, IDBConnection $connection, ILogger $logger) { + public function __construct(GlobalStoragesService $globalService, IDBConnection $connection, ILogger $logger) { parent::__construct(); $this->globalService = $globalService; $this->connection = $connection; diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php index 062a0c6ea5f..bd80c2267e7 100644 --- a/apps/files_external/lib/Command/Verify.php +++ b/apps/files_external/lib/Command/Verify.php @@ -42,7 +42,7 @@ class Verify extends Base { */ protected $globalService; - function __construct(GlobalStoragesService $globalService) { + public function __construct(GlobalStoragesService $globalService) { parent::__construct(); $this->globalService = $globalService; } diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php index 4822789ba2b..cd72634e58a 100644 --- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php +++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php @@ -32,7 +32,7 @@ use OCP\IL10N; * Amazon S3 access key authentication */ class AccessKey extends AuthMechanism { - const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey'; + public const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey'; public function __construct(IL10N $l) { $this diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php index c13774ea5e0..5a693b75dbf 100644 --- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php +++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php @@ -52,14 +52,14 @@ use OCA\Files_External\Lib\VisibilityTrait; */ class AuthMechanism implements \JsonSerializable { /** Standard authentication schemes */ - const SCHEME_NULL = 'null'; - const SCHEME_BUILTIN = 'builtin'; - const SCHEME_PASSWORD = 'password'; - const SCHEME_OAUTH1 = 'oauth1'; - const SCHEME_OAUTH2 = 'oauth2'; - const SCHEME_PUBLICKEY = 'publickey'; - const SCHEME_OPENSTACK = 'openstack'; - const SCHEME_SMB = 'smb'; + public const SCHEME_NULL = 'null'; + public const SCHEME_BUILTIN = 'builtin'; + public const SCHEME_PASSWORD = 'password'; + public const SCHEME_OAUTH1 = 'oauth1'; + public const SCHEME_OAUTH2 = 'oauth2'; + public const SCHEME_PUBLICKEY = 'publickey'; + public const SCHEME_OPENSTACK = 'openstack'; + public const SCHEME_SMB = 'smb'; use VisibilityTrait; use FrontendDefinitionTrait; diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php index de6e34c4443..34b1b747bfe 100644 --- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php +++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php @@ -36,7 +36,7 @@ use OCP\Security\ICredentialsManager; * Global Username and Password */ class GlobalAuth extends AuthMechanism { - const CREDENTIALS_IDENTIFIER = 'password::global'; + public const CREDENTIALS_IDENTIFIER = 'password::global'; /** @var ICredentialsManager */ protected $credentialsManager; diff --git a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php index 0165bb6d077..8d06707b2af 100644 --- a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php +++ b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php @@ -35,7 +35,7 @@ use OCP\Security\ICredentialsManager; * Username and password from login credentials, saved in DB */ class LoginCredentials extends AuthMechanism { - const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials'; + public const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials'; /** @var ISession */ protected $session; diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php index 552b707b544..429e0f1c261 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php @@ -37,7 +37,7 @@ use OCP\Security\ICredentialsManager; * User provided Username and Password */ class UserProvided extends AuthMechanism implements IUserProvided { - const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/'; + public const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/'; /** @var ICredentialsManager */ protected $credentialsManager; diff --git a/apps/files_external/lib/Lib/Backend/InvalidBackend.php b/apps/files_external/lib/Lib/Backend/InvalidBackend.php index fc9b0992197..36e033cfc90 100644 --- a/apps/files_external/lib/Lib/Backend/InvalidBackend.php +++ b/apps/files_external/lib/Lib/Backend/InvalidBackend.php @@ -43,7 +43,7 @@ class InvalidBackend extends Backend { * * @param string $invalidId id of the backend that did not exist */ - function __construct($invalidId) { + public function __construct($invalidId) { $this->invalidId = $invalidId; $this ->setIdentifier($invalidId) diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php index 2e1ce7fb1dd..519de22d70d 100644 --- a/apps/files_external/lib/Lib/DefinitionParameter.php +++ b/apps/files_external/lib/Lib/DefinitionParameter.php @@ -29,18 +29,18 @@ namespace OCA\Files_External\Lib; class DefinitionParameter implements \JsonSerializable { // placeholder value for password fields, when the client updates a storage configuration // placeholder values are ignored and the field is left unmodified - const UNMODIFIED_PLACEHOLDER = '__unmodified__'; + public const UNMODIFIED_PLACEHOLDER = '__unmodified__'; /** Value constants */ - const VALUE_TEXT = 0; - const VALUE_BOOLEAN = 1; - const VALUE_PASSWORD = 2; - const VALUE_HIDDEN = 3; + public const VALUE_TEXT = 0; + public const VALUE_BOOLEAN = 1; + public const VALUE_PASSWORD = 2; + public const VALUE_HIDDEN = 3; /** Flag constants */ - const FLAG_NONE = 0; - const FLAG_OPTIONAL = 1; - const FLAG_USER_PROVIDED = 2; + public const FLAG_NONE = 0; + public const FLAG_OPTIONAL = 1; + public const FLAG_USER_PROVIDED = 2; /** @var string name of parameter */ private $name; diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php index d8e3ee321b7..8125d87d9ee 100644 --- a/apps/files_external/lib/Lib/Storage/OwnCloud.php +++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php @@ -39,7 +39,7 @@ use Sabre\DAV\Client; * */ class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorage { - const OC_URL_SUFFIX = 'remote.php/webdav'; + public const OC_URL_SUFFIX = 'remote.php/webdav'; public function __construct($params) { // extract context path from host if specified diff --git a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php index a3023d1a22b..a1e3696a46e 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php @@ -50,7 +50,7 @@ class SFTPReadStream implements File { private $buffer = ''; - static function register($protocol = 'sftpread') { + public static function register($protocol = 'sftpread') { if (in_array($protocol, stream_get_wrappers(), true)) { return false; } diff --git a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php index 50faf8f466c..c817789dad6 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php @@ -50,7 +50,7 @@ class SFTPWriteStream implements File { private $buffer = ''; - static function register($protocol = 'sftpwrite') { + public static function register($protocol = 'sftpwrite') { if (in_array($protocol, stream_get_wrappers(), true)) { return false; } diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 96fb4f0ac9a..3ecb73f54af 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -101,7 +101,7 @@ class Swift extends \OC\Files\Storage\Common { return $path; } - const SUBCONTAINER_FILE = '.subcontainers'; + public const SUBCONTAINER_FILE = '.subcontainers'; /** * translate directory path to container name diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php index 5ed65918b22..43d95b8232a 100644 --- a/apps/files_external/lib/Lib/StorageConfig.php +++ b/apps/files_external/lib/Lib/StorageConfig.php @@ -36,8 +36,8 @@ use OCA\Files_External\Lib\Backend\Backend; * External storage configuration */ class StorageConfig implements \JsonSerializable { - const MOUNT_TYPE_ADMIN = 1; - const MOUNT_TYPE_PERSONAl = 2; + public const MOUNT_TYPE_ADMIN = 1; + public const MOUNT_TYPE_PERSONAl = 2; /** * Storage config id diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index 617b44651ae..d89e782f6f6 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -41,15 +41,15 @@ use OCP\IConfig; class BackendService { /** Visibility constants for VisibilityTrait */ - const VISIBILITY_NONE = 0; - const VISIBILITY_PERSONAL = 1; - const VISIBILITY_ADMIN = 2; + public const VISIBILITY_NONE = 0; + public const VISIBILITY_PERSONAL = 1; + public const VISIBILITY_ADMIN = 2; //const VISIBILITY_ALIENS = 4; - const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN + public const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN /** Priority constants for PriorityTrait */ - const PRIORITY_DEFAULT = 100; + public const PRIORITY_DEFAULT = 100; /** @var IConfig */ protected $config; diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php index 51373e8dda6..7a4579fd3f7 100644 --- a/apps/files_external/lib/Service/DBConfigService.php +++ b/apps/files_external/lib/Service/DBConfigService.php @@ -36,12 +36,12 @@ use OCP\Security\ICrypto; * Stores the mount config in the database */ class DBConfigService { - const MOUNT_TYPE_ADMIN = 1; - const MOUNT_TYPE_PERSONAl = 2; + public const MOUNT_TYPE_ADMIN = 1; + public const MOUNT_TYPE_PERSONAl = 2; - const APPLICABLE_TYPE_GLOBAL = 1; - const APPLICABLE_TYPE_GROUP = 2; - const APPLICABLE_TYPE_USER = 3; + public const APPLICABLE_TYPE_GLOBAL = 1; + public const APPLICABLE_TYPE_GROUP = 2; + public const APPLICABLE_TYPE_USER = 3; /** * @var IDBConnection diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index c69955c3406..745f2da6d5e 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -60,10 +60,10 @@ use phpseclib\Crypt\AES; class OC_Mount_Config { // TODO: make this class non-static and give it a proper namespace - const MOUNT_TYPE_GLOBAL = 'global'; - const MOUNT_TYPE_GROUP = 'group'; - const MOUNT_TYPE_USER = 'user'; - const MOUNT_TYPE_PERSONAL = 'personal'; + public const MOUNT_TYPE_GLOBAL = 'global'; + public const MOUNT_TYPE_GROUP = 'group'; + public const MOUNT_TYPE_USER = 'user'; + public const MOUNT_TYPE_PERSONAL = 'personal'; // whether to skip backend test (for unit tests, as this static class is not mockable) public static $skipTest = false; diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 40d0154d992..617ad11c459 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -173,7 +173,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals($storageConfig, $data); } - function mountPointNamesProvider() { + public function mountPointNamesProvider() { return [ [''], ['/'], diff --git a/apps/files_external/tests/OwnCloudFunctionsTest.php b/apps/files_external/tests/OwnCloudFunctionsTest.php index 7ce72ce62d6..47544312576 100644 --- a/apps/files_external/tests/OwnCloudFunctionsTest.php +++ b/apps/files_external/tests/OwnCloudFunctionsTest.php @@ -35,7 +35,7 @@ namespace OCA\Files_External\Tests; * @package OCA\Files_External\Tests */ class OwnCloudFunctionsTest extends \Test\TestCase { - function configUrlProvider() { + public function configUrlProvider() { return [ [ [ diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index b977a4b3eb6..e35649dacf5 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -63,7 +63,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]); } - function storageDataProvider() { + public function storageDataProvider() { return [ // all users [ @@ -191,7 +191,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals(0, $newStorage->getStatus()); } - function hooksAddStorageDataProvider() { + public function hooksAddStorageDataProvider() { return [ // applicable all [ @@ -320,7 +320,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } } - function hooksUpdateStorageDataProvider() { + public function hooksUpdateStorageDataProvider() { return [ [ // nothing to multiple users and groups @@ -551,7 +551,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } } - function hooksDeleteStorageDataProvider() { + public function hooksDeleteStorageDataProvider() { return [ [ ['user1', 'user2'], diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index c23d741b23d..f99b25a9fc7 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -57,9 +57,9 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { protected $user; - const USER_ID = 'test_user'; - const GROUP_ID = 'test_group'; - const GROUP_ID2 = 'test_group2'; + public const USER_ID = 'test_user'; + public const GROUP_ID = 'test_group'; + public const GROUP_ID2 = 'test_group2'; protected function setUp(): void { parent::setUp(); |