diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 16:54:27 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 16:54:27 +0200 |
commit | 28f8eb5dba60a75f7e22debbdc26f1d3164deb18 (patch) | |
tree | 5bb8a104ec6b5af821b81cf392c69167deca4c0a /apps/files_external | |
parent | 1584c9ae9c23d2a7915750ef9203cba0bcebf766 (diff) | |
download | nextcloud-server-28f8eb5dba60a75f7e22debbdc26f1d3164deb18.tar.gz nextcloud-server-28f8eb5dba60a75f7e22debbdc26f1d3164deb18.zip |
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_external')
14 files changed, 42 insertions, 42 deletions
diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index e7f43ce2a0e..b238b33f6a4 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -58,7 +58,7 @@ class ListCommand extends Base { */ protected $userManager; - const ALL = -1; + public const ALL = -1; public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { parent::__construct(); 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/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/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/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(); |