Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-04-11 09:21:35 +0300
committerGitHub <noreply@github.com>2020-04-11 09:21:35 +0300
commitb5a30d5cd6b53831c0d6d2fd074dc0000fa811de (patch)
tree386f3cb5df4630a1e87dae706667772e590596b8 /lib
parent97de425a171adf9194dae75eede74cf9f3356cc8 (diff)
parenteea282ccc0d9dfae2d321efddce99cdb18158338 (diff)
Merge pull request #20426 from nextcloud/techdebt/psr2
It is done
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/private/App/AppStore/Bundles/Bundle.php6
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php2
-rw-r--r--lib/private/App/CodeChecker/CodeChecker.php16
-rw-r--r--lib/private/App/CompareVersion.php8
-rw-r--r--lib/private/App/Platform.php2
-rw-r--r--lib/private/AppFramework/Http/Request.php24
-rw-r--r--lib/private/Archive/Archive.php28
-rw-r--r--lib/private/Archive/TAR.php8
-rw-r--r--lib/private/Authentication/Login/ALoginCommand.php2
-rw-r--r--lib/private/Authentication/Token/DefaultToken.php2
-rw-r--r--lib/private/Authentication/Token/IToken.php10
-rw-r--r--lib/private/Authentication/Token/PublicKeyToken.php2
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php2
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php8
-rw-r--r--lib/private/Authentication/TwoFactorAuth/ProviderLoader.php2
-rw-r--r--lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php4
-rw-r--r--lib/private/Config.php2
-rw-r--r--lib/private/DB/AdapterOCI8.php2
-rw-r--r--lib/private/DB/AdapterPgSql.php2
-rw-r--r--lib/private/DB/ConnectionFactory.php4
-rw-r--r--lib/private/DB/MDB2SchemaWriter.php2
-rw-r--r--lib/private/DB/ReconnectWrapper.php2
-rw-r--r--lib/private/Encryption/Keys/Storage.php2
-rw-r--r--lib/private/Encryption/Util.php8
-rw-r--r--lib/private/Files/Cache/Cache.php2
-rw-r--r--lib/private/Files/Cache/QuerySearchHelper.php7
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheWrapper.php2
-rw-r--r--lib/private/Files/Filesystem.php146
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php1
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php6
-rw-r--r--lib/private/Files/ObjectStore/StorageObjectStore.php8
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php2
-rw-r--r--lib/private/Files/Storage/Flysystem.php1
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php2
-rw-r--r--lib/private/Files/Stream/Quota.php2
-rw-r--r--lib/private/Files/Utils/Scanner.php2
-rw-r--r--lib/private/Group/Backend.php2
-rw-r--r--lib/private/Group/Database.php4
-rw-r--r--lib/private/Group/MetaData.php6
-rw-r--r--lib/private/Http/CookieHelper.php6
-rw-r--r--lib/private/IntegrityCheck/Checker.php2
-rw-r--r--lib/private/L10N/Factory.php2
-rw-r--r--lib/private/L10N/LanguageIterator.php5
-rwxr-xr-xlib/private/LargeFileHelper.php4
-rw-r--r--lib/private/Log/ExceptionSerializer.php4
-rw-r--r--lib/private/Memcache/APCu.php2
-rw-r--r--lib/private/Memcache/ArrayCache.php2
-rw-r--r--lib/private/Memcache/Factory.php2
-rw-r--r--lib/private/Memcache/Memcached.php2
-rw-r--r--lib/private/Memcache/NullCache.php2
-rw-r--r--lib/private/Memcache/Redis.php2
-rw-r--r--lib/private/MemoryInfo.php4
-rw-r--r--lib/private/Remote/User.php2
-rw-r--r--lib/private/Repair/Owncloud/SaveAccountsTableData.php2
-rw-r--r--lib/private/Repair/RepairInvalidShares.php2
-rw-r--r--lib/private/Search/Result/File.php2
-rw-r--r--lib/private/Security/Bruteforce/Throttler.php2
-rw-r--r--lib/private/Security/CredentialsManager.php2
-rw-r--r--lib/private/Server.php4
-rw-r--r--lib/private/Session/CryptoSessionData.php2
-rw-r--r--lib/private/Session/CryptoWrapper.php2
-rw-r--r--lib/private/Setup.php2
-rw-r--r--lib/private/Share/Constants.php30
-rw-r--r--lib/private/Share20/DefaultShareProvider.php2
-rw-r--r--lib/private/SystemTag/SystemTagManager.php4
-rw-r--r--lib/private/SystemTag/SystemTagObjectMapper.php2
-rw-r--r--lib/private/Tags.php4
-rw-r--r--lib/private/TempManager.php2
-rw-r--r--lib/private/TemplateLayout.php4
-rw-r--r--lib/private/Updater/ChangesCheck.php6
-rw-r--r--lib/private/Updater/ChangesMapper.php2
-rw-r--r--lib/private/User/Backend.php18
-rw-r--r--lib/private/User/Database.php4
-rw-r--r--lib/private/legacy/OC_App.php16
-rw-r--r--lib/private/legacy/OC_DB.php6
-rw-r--r--lib/private/legacy/OC_FileChunking.php2
-rw-r--r--lib/private/legacy/OC_Files.php8
-rw-r--r--lib/private/legacy/OC_Helper.php6
-rw-r--r--lib/private/legacy/OC_Hook.php10
-rw-r--r--lib/private/legacy/OC_Image.php1
-rw-r--r--lib/private/legacy/OC_Response.php4
-rw-r--r--lib/public/API.php8
-rw-r--r--lib/public/Accounts/IAccountManager.php26
-rw-r--r--lib/public/Activity/IExtension.php14
-rw-r--r--lib/public/App/ManagerEvent.php8
-rw-r--r--lib/public/AppFramework/Http.php118
-rw-r--r--lib/public/AppFramework/Http/TemplateResponse.php4
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IProvider.php4
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IRegistry.php4
-rw-r--r--lib/public/Comments/CommentsEntityEvent.php2
-rw-r--r--lib/public/Comments/CommentsEvent.php8
-rw-r--r--lib/public/Comments/IComment.php2
-rw-r--r--lib/public/Comments/ICommentsManager.php2
-rw-r--r--lib/public/Console/ConsoleEvent.php2
-rw-r--r--lib/public/Constants.php14
-rw-r--r--lib/public/DB/QueryBuilder/IExpressionBuilder.php12
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php16
-rw-r--r--lib/public/Dashboard/Model/WidgetSetting.php4
-rw-r--r--lib/public/Dashboard/Model/WidgetSetup.php6
-rw-r--r--lib/public/Files.php6
-rw-r--r--lib/public/Files/Cache/ICache.php8
-rw-r--r--lib/public/Files/Cache/ICacheEntry.php2
-rw-r--r--lib/public/Files/Cache/IScanner.php12
-rw-r--r--lib/public/Files/Cache/IWatcher.php6
-rw-r--r--lib/public/Files/FileInfo.php14
-rw-r--r--lib/public/Files/Notify/IChange.php8
-rw-r--r--lib/public/Files/Search/ISearchBinaryOperator.php6
-rw-r--r--lib/public/Files/Search/ISearchComparison.php12
-rw-r--r--lib/public/Files/Search/ISearchOrder.php4
-rw-r--r--lib/public/Files/Storage/INotifyStorage.php8
-rw-r--r--lib/public/Files/StorageNotAvailableException.php14
-rw-r--r--lib/public/FullTextSearch/Model/IIndex.php38
-rw-r--r--lib/public/FullTextSearch/Model/IIndexDocument.php4
-rw-r--r--lib/public/FullTextSearch/Model/IRunner.php6
-rw-r--r--lib/public/FullTextSearch/Model/ISearchOption.php6
-rw-r--r--lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php22
-rw-r--r--lib/public/GroupInterface.php16
-rw-r--r--lib/public/IConfig.php2
-rw-r--r--lib/public/IDBConnection.php8
-rw-r--r--lib/public/ILogger.php10
-rw-r--r--lib/public/INavigationManager.php6
-rw-r--r--lib/public/IPreview.php6
-rw-r--r--lib/public/IRequest.php14
-rw-r--r--lib/public/Lock/ILockingProvider.php4
-rw-r--r--lib/public/Search/PagedProvider.php2
-rw-r--r--lib/public/Search/Provider.php2
-rw-r--r--lib/public/Security/ISecureRandom.php10
-rw-r--r--lib/public/Settings/IManager.php8
-rw-r--r--lib/public/SystemTag/ManagerEvent.php6
-rw-r--r--lib/public/SystemTag/MapperEvent.php4
-rw-r--r--lib/public/SystemTag/SystemTagsEntityEvent.php2
-rw-r--r--lib/public/Util.php14
-rw-r--r--lib/public/WorkflowEngine/IManager.php10
134 files changed, 550 insertions, 541 deletions
diff --git a/lib/base.php b/lib/base.php
index f6eb79ab270..b1f9569926f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -1043,7 +1043,7 @@ class OC {
* @param OCP\IRequest $request
* @return boolean
*/
- static function handleLogin(OCP\IRequest $request) {
+ public static function handleLogin(OCP\IRequest $request) {
$userSession = self::$server->getUserSession();
if (OC_User::handleApacheAuth()) {
return true;
diff --git a/lib/private/App/AppStore/Bundles/Bundle.php b/lib/private/App/AppStore/Bundles/Bundle.php
index d6b74ff3b6b..16458121b36 100644
--- a/lib/private/App/AppStore/Bundles/Bundle.php
+++ b/lib/private/App/AppStore/Bundles/Bundle.php
@@ -41,7 +41,7 @@ abstract class Bundle {
*
* @return string
*/
- public final function getIdentifier() {
+ final public function getIdentifier() {
return substr(strrchr(get_class($this), '\\'), 1);
}
@@ -50,12 +50,12 @@ abstract class Bundle {
*
* @return string
*/
- public abstract function getName();
+ abstract public function getName();
/**
* Get the list of app identifiers in the bundle
*
* @return array
*/
- public abstract function getAppIdentifiers();
+ abstract public function getAppIdentifiers();
}
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index fd0600a3ce4..a54d149df62 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -40,7 +40,7 @@ use OCP\IConfig;
use OCP\ILogger;
abstract class Fetcher {
- const INVALIDATE_AFTER_SECONDS = 300;
+ public const INVALIDATE_AFTER_SECONDS = 300;
/** @var IAppData */
protected $appData;
diff --git a/lib/private/App/CodeChecker/CodeChecker.php b/lib/private/App/CodeChecker/CodeChecker.php
index aa8f43e6af2..01969006af4 100644
--- a/lib/private/App/CodeChecker/CodeChecker.php
+++ b/lib/private/App/CodeChecker/CodeChecker.php
@@ -37,14 +37,14 @@ use RegexIterator;
use SplFileInfo;
class CodeChecker extends BasicEmitter {
- const CLASS_EXTENDS_NOT_ALLOWED = 1000;
- const CLASS_IMPLEMENTS_NOT_ALLOWED = 1001;
- const STATIC_CALL_NOT_ALLOWED = 1002;
- const CLASS_CONST_FETCH_NOT_ALLOWED = 1003;
- const CLASS_NEW_NOT_ALLOWED = 1004;
- const OP_OPERATOR_USAGE_DISCOURAGED = 1005;
- const CLASS_USE_NOT_ALLOWED = 1006;
- const CLASS_METHOD_CALL_NOT_ALLOWED = 1007;
+ public const CLASS_EXTENDS_NOT_ALLOWED = 1000;
+ public const CLASS_IMPLEMENTS_NOT_ALLOWED = 1001;
+ public const STATIC_CALL_NOT_ALLOWED = 1002;
+ public const CLASS_CONST_FETCH_NOT_ALLOWED = 1003;
+ public const CLASS_NEW_NOT_ALLOWED = 1004;
+ public const OP_OPERATOR_USAGE_DISCOURAGED = 1005;
+ public const CLASS_USE_NOT_ALLOWED = 1006;
+ public const CLASS_METHOD_CALL_NOT_ALLOWED = 1007;
/** @var Parser */
private $parser;
diff --git a/lib/private/App/CompareVersion.php b/lib/private/App/CompareVersion.php
index 12cd7615769..5d38d4c358e 100644
--- a/lib/private/App/CompareVersion.php
+++ b/lib/private/App/CompareVersion.php
@@ -26,10 +26,10 @@ namespace OC\App;
use InvalidArgumentException;
class CompareVersion {
- const REGEX_MAJOR = '/^\d+$/';
- const REGEX_MAJOR_MINOR = '/^\d+.\d+$/';
- const REGEX_MAJOR_MINOR_PATCH = '/^\d+.\d+.\d+$/';
- const REGEX_SERVER = '/^\d+.\d+.\d+(.\d+)?$/';
+ public const REGEX_MAJOR = '/^\d+$/';
+ public const REGEX_MAJOR_MINOR = '/^\d+.\d+$/';
+ public const REGEX_MAJOR_MINOR_PATCH = '/^\d+.\d+.\d+$/';
+ public const REGEX_SERVER = '/^\d+.\d+.\d+(.\d+)?$/';
/**
* Checks if the given server version fulfills the given (app) version requirements.
diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php
index 45b00c20219..f03e241e9a0 100644
--- a/lib/private/App/Platform.php
+++ b/lib/private/App/Platform.php
@@ -38,7 +38,7 @@ class Platform {
/**
* @param IConfig $config
*/
- function __construct(IConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
}
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 1dcec3c3b98..2ef7b4a0995 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -64,32 +64,32 @@ use OCP\Security\ISecureRandom;
* @property mixed[] server
*/
class Request implements \ArrayAccess, \Countable, IRequest {
- const USER_AGENT_IE = '/(MSIE)|(Trident)/';
+ public const USER_AGENT_IE = '/(MSIE)|(Trident)/';
// Microsoft Edge User Agent from https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
- const USER_AGENT_MS_EDGE = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/';
+ public const USER_AGENT_MS_EDGE = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/';
// Firefox User Agent from https://developer.mozilla.org/en-US/docs/Web/HTTP/Gecko_user_agent_string_reference
- const USER_AGENT_FIREFOX = '/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/[0-9.]+$/';
+ public const USER_AGENT_FIREFOX = '/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/[0-9.]+$/';
// Chrome User Agent from https://developer.chrome.com/multidevice/user-agent
- const USER_AGENT_CHROME = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)( Ubuntu Chromium\/[0-9.]+|) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+( (Vivaldi|Brave|OPR)\/[0-9.]+|)$/';
+ public const USER_AGENT_CHROME = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)( Ubuntu Chromium\/[0-9.]+|) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+( (Vivaldi|Brave|OPR)\/[0-9.]+|)$/';
// Safari User Agent from http://www.useragentstring.com/pages/Safari/
- const USER_AGENT_SAFARI = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/[0-9.]+ Safari\/[0-9.A-Z]+$/';
+ public const USER_AGENT_SAFARI = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/[0-9.]+ Safari\/[0-9.A-Z]+$/';
// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
- const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
- const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
- const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|::1)$/';
+ public const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
+ public const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
+ public const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|::1)$/';
/**
* @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_IOS instead
*/
- const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
+ public const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
/**
* @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_ANDROID instead
*/
- const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
+ public const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
/**
* @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_DESKTOP instead
*/
- const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
+ public const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
protected $inputStream;
protected $content;
@@ -282,7 +282,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
case 'parameters':
case 'params':
return $this->getContent();
- default;
+ default:
return isset($this[$name])
? $this[$name]
: null;
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index 5150e6ddee3..43b44e5a23a 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -34,88 +34,88 @@ abstract class Archive {
/**
* @param $source
*/
- public abstract function __construct($source);
+ abstract public function __construct($source);
/**
* add an empty folder to the archive
* @param string $path
* @return bool
*/
- public abstract function addFolder($path);
+ abstract public function addFolder($path);
/**
* add a file to the archive
* @param string $path
* @param string $source either a local file or string data
* @return bool
*/
- public abstract function addFile($path, $source='');
+ abstract public function addFile($path, $source='');
/**
* rename a file or folder in the archive
* @param string $source
* @param string $dest
* @return bool
*/
- public abstract function rename($source, $dest);
+ abstract public function rename($source, $dest);
/**
* get the uncompressed size of a file in the archive
* @param string $path
* @return int
*/
- public abstract function filesize($path);
+ abstract public function filesize($path);
/**
* get the last modified time of a file in the archive
* @param string $path
* @return int
*/
- public abstract function mtime($path);
+ abstract public function mtime($path);
/**
* get the files in a folder
* @param string $path
* @return array
*/
- public abstract function getFolder($path);
+ abstract public function getFolder($path);
/**
* get all files in the archive
* @return array
*/
- public abstract function getFiles();
+ abstract public function getFiles();
/**
* get the content of a file
* @param string $path
* @return string
*/
- public abstract function getFile($path);
+ abstract public function getFile($path);
/**
* extract a single file from the archive
* @param string $path
* @param string $dest
* @return bool
*/
- public abstract function extractFile($path, $dest);
+ abstract public function extractFile($path, $dest);
/**
* extract the archive
* @param string $dest
* @return bool
*/
- public abstract function extract($dest);
+ abstract public function extract($dest);
/**
* check if a file or folder exists in the archive
* @param string $path
* @return bool
*/
- public abstract function fileExists($path);
+ abstract public function fileExists($path);
/**
* remove a file or folder from the archive
* @param string $path
* @return bool
*/
- public abstract function remove($path);
+ abstract public function remove($path);
/**
* get a file handler
* @param string $path
* @param string $mode
* @return resource
*/
- public abstract function getStream($path, $mode);
+ abstract public function getStream($path, $mode);
/**
* add a folder and all its content
* @param string $path
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index d90e21305c3..0d4103299ce 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -35,9 +35,9 @@ namespace OC\Archive;
use Icewind\Streams\CallbackWrapper;
class TAR extends Archive {
- const PLAIN = 0;
- const GZIP = 1;
- const BZIP = 2;
+ public const PLAIN = 0;
+ public const GZIP = 1;
+ public const BZIP = 2;
private $fileList;
private $cachedHeaders;
@@ -63,7 +63,7 @@ class TAR extends Archive {
* @param string $file
* @return integer
*/
- static public function getTarType($file) {
+ public static function getTarType($file) {
if (strpos($file, '.')) {
$extension = substr($file, strrpos($file, '.'));
switch ($extension) {
diff --git a/lib/private/Authentication/Login/ALoginCommand.php b/lib/private/Authentication/Login/ALoginCommand.php
index 8ad162842bf..effc9adf1c0 100644
--- a/lib/private/Authentication/Login/ALoginCommand.php
+++ b/lib/private/Authentication/Login/ALoginCommand.php
@@ -43,5 +43,5 @@ abstract class ALoginCommand {
}
}
- public abstract function process(LoginData $loginData): LoginResult;
+ abstract public function process(LoginData $loginData): LoginResult;
}
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php
index 7ca05849635..9df907dfb4a 100644
--- a/lib/private/Authentication/Token/DefaultToken.php
+++ b/lib/private/Authentication/Token/DefaultToken.php
@@ -43,7 +43,7 @@ use OCP\AppFramework\Db\Entity;
* @method void setVersion(int $version)
*/
class DefaultToken extends Entity implements INamedToken {
- const VERSION = 1;
+ public const VERSION = 1;
/** @var string user UID */
protected $uid;
diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php
index 1f7c736f86b..326e9554b8e 100644
--- a/lib/private/Authentication/Token/IToken.php
+++ b/lib/private/Authentication/Token/IToken.php
@@ -30,11 +30,11 @@ namespace OC\Authentication\Token;
use JsonSerializable;
interface IToken extends JsonSerializable {
- const TEMPORARY_TOKEN = 0;
- const PERMANENT_TOKEN = 1;
- const WIPE_TOKEN = 2;
- const DO_NOT_REMEMBER = 0;
- const REMEMBER = 1;
+ public const TEMPORARY_TOKEN = 0;
+ public const PERMANENT_TOKEN = 1;
+ public const WIPE_TOKEN = 2;
+ public const DO_NOT_REMEMBER = 0;
+ public const REMEMBER = 1;
/**
* Get the token ID
diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php
index 27eda0b6889..0724eabc70c 100644
--- a/lib/private/Authentication/Token/PublicKeyToken.php
+++ b/lib/private/Authentication/Token/PublicKeyToken.php
@@ -47,7 +47,7 @@ use OCP\AppFramework\Db\Entity;
* @method bool getPasswordInvalid()
*/
class PublicKeyToken extends Entity implements INamedToken, IWipeableToken {
- const VERSION = 2;
+ public const VERSION = 2;
/** @var string user UID */
protected $uid;
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
index a5ddad47e01..02e6863d1c4 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -35,7 +35,7 @@ use OCP\IDBConnection;
* 2FA providers
*/
class ProviderUserAssignmentDao {
- const TABLE_NAME = 'twofactor_providers';
+ public const TABLE_NAME = 'twofactor_providers';
/** @var IDBConnection */
private $conn;
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index ec414e67938..07e61175361 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -46,10 +46,10 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
class Manager {
- const SESSION_UID_KEY = 'two_factor_auth_uid';
- const SESSION_UID_DONE = 'two_factor_auth_passed';
- const REMEMBER_LOGIN = 'two_factor_remember_login';
- const BACKUP_CODES_PROVIDER_ID = 'backup_codes';
+ public const SESSION_UID_KEY = 'two_factor_auth_uid';
+ public const SESSION_UID_DONE = 'two_factor_auth_passed';
+ public const REMEMBER_LOGIN = 'two_factor_remember_login';
+ public const BACKUP_CODES_PROVIDER_ID = 'backup_codes';
/** @var ProviderLoader */
private $providerLoader;
diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
index 0754679adf1..40385d737ae 100644
--- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
+++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
@@ -35,7 +35,7 @@ use OCP\Authentication\TwoFactorAuth\IProvider;
use OCP\IUser;
class ProviderLoader {
- const BACKUP_CODES_APP_ID = 'twofactor_backupcodes';
+ public const BACKUP_CODES_APP_ID = 'twofactor_backupcodes';
/** @var IAppManager */
private $appManager;
diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
index c9ebf8ce456..2a4740bef4b 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
@@ -62,7 +62,7 @@ class PublicKeyCredentialEntity extends Entity implements JsonSerializable {
$this->addType('data', 'string');
}
- static function fromPublicKeyCrendentialSource(string $name, PublicKeyCredentialSource $publicKeyCredentialSource): PublicKeyCredentialEntity {
+ public static function fromPublicKeyCrendentialSource(string $name, PublicKeyCredentialSource $publicKeyCredentialSource): PublicKeyCredentialEntity {
$publicKeyCredentialEntity = new self();
$publicKeyCredentialEntity->setName($name);
@@ -73,7 +73,7 @@ class PublicKeyCredentialEntity extends Entity implements JsonSerializable {
return $publicKeyCredentialEntity;
}
- function toPublicKeyCredentialSource(): PublicKeyCredentialSource {
+ public function toPublicKeyCredentialSource(): PublicKeyCredentialSource {
return PublicKeyCredentialSource::createFromArray(
json_decode($this->getData(), true)
);
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 1724222f4bb..d44f713f361 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -42,7 +42,7 @@ namespace OC;
* configuration file of Nextcloud.
*/
class Config {
- const ENV_PREFIX = 'NC_';
+ public const ENV_PREFIX = 'NC_';
/** @var array Associative array ($key => $value) */
protected $cache = [];
diff --git a/lib/private/DB/AdapterOCI8.php b/lib/private/DB/AdapterOCI8.php
index 3eb50916aab..33a30b8348d 100644
--- a/lib/private/DB/AdapterOCI8.php
+++ b/lib/private/DB/AdapterOCI8.php
@@ -37,7 +37,7 @@ class AdapterOCI8 extends Adapter {
return $this->conn->realLastInsertId($table);
}
- const UNIX_TIMESTAMP_REPLACEMENT = "(cast(sys_extract_utc(systimestamp) as date) - date'1970-01-01') * 86400";
+ public const UNIX_TIMESTAMP_REPLACEMENT = "(cast(sys_extract_utc(systimestamp) as date) - date'1970-01-01') * 86400";
public function fixupStatement($statement) {
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(?, \'%\', \'.*\') || \'$\', \'i\')', $statement);
diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php
index 7457ab9a77d..bc7fa7698ee 100644
--- a/lib/private/DB/AdapterPgSql.php
+++ b/lib/private/DB/AdapterPgSql.php
@@ -33,7 +33,7 @@ class AdapterPgSql extends Adapter {
return $this->conn->fetchColumn('SELECT lastval()');
}
- const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
+ public const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
public function fixupStatement($statement) {
$statement = str_replace('`', '"', $statement);
$statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement);
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index fe97048aaac..441e4567dbd 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -41,10 +41,10 @@ use OC\SystemConfig;
*/
class ConnectionFactory {
/** @var string default database name */
- const DEFAULT_DBNAME = 'owncloud';
+ public const DEFAULT_DBNAME = 'owncloud';
/** @var string default database table prefix */
- const DEFAULT_DBTABLEPREFIX = 'oc_';
+ public const DEFAULT_DBTABLEPREFIX = 'oc_';
/**
* @var array
diff --git a/lib/private/DB/MDB2SchemaWriter.php b/lib/private/DB/MDB2SchemaWriter.php
index 3cabff9d8f1..4af68709387 100644
--- a/lib/private/DB/MDB2SchemaWriter.php
+++ b/lib/private/DB/MDB2SchemaWriter.php
@@ -36,7 +36,7 @@ class MDB2SchemaWriter {
* @param \OC\DB\Connection $conn
* @return bool
*/
- static public function saveSchemaToFile($file, \OC\DB\Connection $conn) {
+ public static function saveSchemaToFile($file, \OC\DB\Connection $conn) {
$config = \OC::$server->getConfig();
$xml = new \SimpleXMLElement('<database/>');
diff --git a/lib/private/DB/ReconnectWrapper.php b/lib/private/DB/ReconnectWrapper.php
index ebb4c56fc6a..df3a0518e35 100644
--- a/lib/private/DB/ReconnectWrapper.php
+++ b/lib/private/DB/ReconnectWrapper.php
@@ -28,7 +28,7 @@ use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Driver;
class ReconnectWrapper extends \Doctrine\DBAL\Connection {
- const CHECK_CONNECTION_INTERVAL = 60;
+ public const CHECK_CONNECTION_INTERVAL = 60;
private $lastConnectionCheck = null;
diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index 2030f26f8f5..38cbfbfdd9f 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -36,7 +36,7 @@ use OCP\Encryption\Keys\IStorage;
class Storage implements IStorage {
// hidden file which indicate that the folder is a valid key storage
- const KEY_STORAGE_MARKER = '.oc_key_storage';
+ public const KEY_STORAGE_MARKER = '.oc_key_storage';
/** @var View */
private $view;
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index a5414a66796..8b3360c30e0 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -38,11 +38,11 @@ use OCP\IConfig;
use OCP\IUser;
class Util {
- const HEADER_START = 'HBEGIN';
- const HEADER_END = 'HEND';
- const HEADER_PADDING_CHAR = '-';
+ public const HEADER_START = 'HBEGIN';
+ public const HEADER_END = 'HEND';
+ public const HEADER_PADDING_CHAR = '-';
- const HEADER_ENCRYPTION_MODULE_KEY = 'oc_encryption_module';
+ public const HEADER_ENCRYPTION_MODULE_KEY = 'oc_encryption_module';
/**
* block size will always be 8192 for a PHP stream
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 2dfefeff662..78749da0cac 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -963,7 +963,7 @@ class Cache implements ICache {
* @return array first element holding the storage id, second the path
* @deprecated use getPathById() instead
*/
- static public function getById($id) {
+ public static function getById($id) {
$query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->select('path', 'storage')
->from('filecache')
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index 9f2d7aadd7e..e1ecad50733 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -36,7 +36,7 @@ use OCP\Files\Search\ISearchOrder;
* Tools for transforming search queries into database queries
*/
class QuerySearchHelper {
- static protected $searchOperatorMap = [
+ protected static $searchOperatorMap = [
ISearchComparison::COMPARE_LIKE => 'iLike',
ISearchComparison::COMPARE_EQUAL => 'eq',
ISearchComparison::COMPARE_GREATER_THAN => 'gt',
@@ -45,7 +45,7 @@ class QuerySearchHelper {
ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lte'
];
- static protected $searchOperatorNegativeMap = [
+ protected static $searchOperatorNegativeMap = [
ISearchComparison::COMPARE_LIKE => 'notLike',
ISearchComparison::COMPARE_EQUAL => 'neq',
ISearchComparison::COMPARE_GREATER_THAN => 'lte',
@@ -54,7 +54,7 @@ class QuerySearchHelper {
ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lt'
];
- const TAG_FAVORITE = '_$!<Favorite>!$_';
+ public const TAG_FAVORITE = '_$!<Favorite>!$_';
/** @var IMimeTypeLoader */
private $mimetypeLoader;
@@ -110,6 +110,7 @@ class QuerySearchHelper {
} else {
throw new \InvalidArgumentException('Binary operators inside "not" is not supported');
}
+ // no break
case ISearchBinaryOperator::OPERATOR_AND:
return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments()));
case ISearchBinaryOperator::OPERATOR_OR:
diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
index 302758bbc22..4901a530799 100644
--- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php
+++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
@@ -319,7 +319,7 @@ class CacheWrapper extends Cache {
* @param int $id
* @return array first element holding the storage id, second the path
*/
- static public function getById($id) {
+ public static function getById($id) {
return parent::getById($id);
}
}
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index 1999edf67fd..d3c4e1afc62 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -80,19 +80,19 @@ class Filesystem {
/**
* @var \OC\Files\View $defaultInstance
*/
- static private $defaultInstance;
+ private static $defaultInstance;
- static private $usersSetup = [];
+ private static $usersSetup = [];
- static private $normalizedPathCache = null;
+ private static $normalizedPathCache = null;
- static private $listeningForProviders = false;
+ private static $listeningForProviders = false;
/**
* classname which used for hooks handling
* used as signalclass in OC_Hooks::emit()
*/
- const CLASSNAME = 'OC_Filesystem';
+ public const CLASSNAME = 'OC_Filesystem';
/**
* signalname emitted before file renaming
@@ -100,7 +100,7 @@ class Filesystem {
* @param string $oldpath
* @param string $newpath
*/
- const signal_rename = 'rename';
+ public const signal_rename = 'rename';
/**
* signal emitted after file renaming
@@ -108,7 +108,7 @@ class Filesystem {
* @param string $oldpath
* @param string $newpath
*/
- const signal_post_rename = 'post_rename';
+ public const signal_post_rename = 'post_rename';
/**
* signal emitted before file/dir creation
@@ -116,7 +116,7 @@ class Filesystem {
* @param string $path
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_create = 'create';
+ public const signal_create = 'create';
/**
* signal emitted after file/dir creation
@@ -124,7 +124,7 @@ class Filesystem {
* @param string $path
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_post_create = 'post_create';
+ public const signal_post_create = 'post_create';
/**
* signal emits before file/dir copy
@@ -133,7 +133,7 @@ class Filesystem {
* @param string $newpath
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_copy = 'copy';
+ public const signal_copy = 'copy';
/**
* signal emits after file/dir copy
@@ -141,7 +141,7 @@ class Filesystem {
* @param string $oldpath
* @param string $newpath
*/
- const signal_post_copy = 'post_copy';
+ public const signal_post_copy = 'post_copy';
/**
* signal emits before file/dir save
@@ -149,14 +149,14 @@ class Filesystem {
* @param string $path
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_write = 'write';
+ public const signal_write = 'write';
/**
* signal emits after file/dir save
*
* @param string $path
*/
- const signal_post_write = 'post_write';
+ public const signal_post_write = 'post_write';
/**
* signal emitted before file/dir update
@@ -164,7 +164,7 @@ class Filesystem {
* @param string $path
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_update = 'update';
+ public const signal_update = 'update';
/**
* signal emitted after file/dir update
@@ -172,38 +172,38 @@ class Filesystem {
* @param string $path
* @param bool $run changing this flag to false in hook handler will cancel event
*/
- const signal_post_update = 'post_update';
+ public const signal_post_update = 'post_update';
/**
* signal emits when reading file/dir
*
* @param string $path
*/
- const signal_read = 'read';
+ public const signal_read = 'read';
/**
* signal emits when removing file/dir
*
* @param string $path
*/
- const signal_delete = 'delete';
+ public const signal_delete = 'delete';
/**
* parameters definitions for signals
*/
- const signal_param_path = 'path';
- const signal_param_oldpath = 'oldpath';
- const signal_param_newpath = 'newpath';
+ public const signal_param_path = 'path';
+ public const signal_param_oldpath = 'oldpath';
+ public const signal_param_newpath = 'newpath';
/**
* run - changing this flag to false in hook handler will cancel event
*/
- const signal_param_run = 'run';
+ public const signal_param_run = 'run';
- const signal_create_mount = 'create_mount';
- const signal_delete_mount = 'delete_mount';
- const signal_param_mount_type = 'mounttype';
- const signal_param_users = 'users';
+ public const signal_create_mount = 'create_mount';
+ public const signal_delete_mount = 'delete_mount';
+ public const signal_param_mount_type = 'mounttype';
+ public const signal_param_users = 'users';
/**
* @var \OC\Files\Storage\StorageFactory $loader
@@ -277,7 +277,7 @@ class Filesystem {
* @param string $path
* @return string
*/
- static public function getMountPoint($path) {
+ public static function getMountPoint($path) {
if (!self::$mounts) {
\OC_Util::setupFS();
}
@@ -295,7 +295,7 @@ class Filesystem {
* @param string $path
* @return string[]
*/
- static public function getMountPoints($path) {
+ public static function getMountPoints($path) {
if (!self::$mounts) {
\OC_Util::setupFS();
}
@@ -349,7 +349,7 @@ class Filesystem {
* @param string $path
* @return array an array consisting of the storage and the internal path
*/
- static public function resolvePath($path) {
+ public static function resolvePath($path) {
if (!self::$mounts) {
\OC_Util::setupFS();
}
@@ -361,7 +361,7 @@ class Filesystem {
}
}
- static public function init($user, $root) {
+ public static function init($user, $root) {
if (self::$defaultInstance) {
return false;
}
@@ -380,7 +380,7 @@ class Filesystem {
return true;
}
- static public function initMountManager() {
+ public static function initMountManager() {
if (!self::$mounts) {
self::$mounts = \OC::$server->getMountManager();
}
@@ -489,14 +489,14 @@ class Filesystem {
*
* @return View
*/
- static public function getView() {
+ public static function getView() {
return self::$defaultInstance;
}
/**
* tear down the filesystem, removing all storage providers
*/
- static public function tearDown() {
+ public static function tearDown() {
self::clearMounts();
self::$defaultInstance = null;
}
@@ -508,7 +508,7 @@ class Filesystem {
*
* Returns path like /admin/files
*/
- static public function getRoot() {
+ public static function getRoot() {
if (!self::$defaultInstance) {
return null;
}
@@ -532,7 +532,7 @@ class Filesystem {
* @param array $arguments
* @param string $mountpoint
*/
- static public function mount($class, $arguments, $mountpoint) {
+ public static function mount($class, $arguments, $mountpoint) {
if (!self::$mounts) {
\OC_Util::setupFS();
}
@@ -548,7 +548,7 @@ class Filesystem {
* @param string $path
* @return string
*/
- static public function getLocalFile($path) {
+ public static function getLocalFile($path) {
return self::$defaultInstance->getLocalFile($path);
}
@@ -556,7 +556,7 @@ class Filesystem {
* @param string $path
* @return string
*/
- static public function getLocalFolder($path) {
+ public static function getLocalFolder($path) {
return self::$defaultInstance->getLocalFolder($path);
}
@@ -566,7 +566,7 @@ class Filesystem {
* @param string $path
* @return string
*/
- static public function getLocalPath($path) {
+ public static function getLocalPath($path) {
$datadir = \OC_User::getHome(\OC_User::getUser()) . '/files';
$newpath = $path;
if (strncmp($newpath, $datadir, strlen($datadir)) == 0) {
@@ -581,7 +581,7 @@ class Filesystem {
* @param string $path
* @return bool
*/
- static public function isValidPath($path) {
+ public static function isValidPath($path) {
$path = self::normalizePath($path);
if (!$path || $path[0] !== '/') {
$path = '/' . $path;
@@ -598,7 +598,7 @@ class Filesystem {
*
* @param array $data from hook
*/
- static public function isBlacklisted($data) {
+ public static function isBlacklisted($data) {
if (isset($data['path'])) {
$path = $data['path'];
} elseif (isset($data['newpath'])) {
@@ -615,7 +615,7 @@ class Filesystem {
* @param string $filename
* @return bool
*/
- static public function isFileBlacklisted($filename) {
+ public static function isFileBlacklisted($filename) {
$filename = self::normalizePath($filename);
$blacklist = \OC::$server->getConfig()->getSystemValue('blacklisted_files', ['.htaccess']);
@@ -630,7 +630,7 @@ class Filesystem {
* @param string $dir
* @return boolean
*/
- static public function isIgnoredDir($dir) {
+ public static function isIgnoredDir($dir) {
if ($dir === '.' || $dir === '..') {
return true;
}
@@ -640,128 +640,128 @@ class Filesystem {
/**
* following functions are equivalent to their php builtin equivalents for arguments/return values.
*/
- static public function mkdir($path) {
+ public static function mkdir($path) {
return self::$defaultInstance->mkdir($path);
}
- static public function rmdir($path) {
+ public static function rmdir($path) {
return self::$defaultInstance->rmdir($path);
}
- static public function is_dir($path) {
+ public static function is_dir($path) {
return self::$defaultInstance->is_dir($path);
}
- static public function is_file($path) {
+ public static function is_file($path) {
return self::$defaultInstance->is_file($path);
}
- static public function stat($path) {
+ public static function stat($path) {
return self::$defaultInstance->stat($path);
}
- static public function filetype($path) {
+ public static function filetype($path) {
return self::$defaultInstance->filetype($path);
}
- static public function filesize($path) {
+ public static function filesize($path) {
return self::$defaultInstance->filesize($path);
}
- static public function readfile($path) {
+ public static function readfile($path) {
return self::$defaultInstance->readfile($path);
}
- static public function isCreatable($path) {
+ public static function isCreatable($path) {
return self::$defaultInstance->isCreatable($path);
}
- static public function isReadable($path) {
+ public static function isReadable($path) {
return self::$defaultInstance->isReadable($path);
}
- static public function isUpdatable($path) {
+ public static function isUpdatable($path) {
return self::$defaultInstance->isUpdatable($path);
}
- static public function isDeletable($path) {
+ public static function isDeletable($path) {
return self::$defaultInstance->isDeletable($path);
}
- static public function isSharable($path) {
+ public static function isSharable($path) {
return self::$defaultInstance->isSharable($path);
}
- static public function file_exists($path) {
+ public static function file_exists($path) {
return self::$defaultInstance->file_exists($path);
}
- static public function filemtime($path) {
+ public static function filemtime($path) {
return self::$defaultInstance->filemtime($path);
}
- static public function touch($path, $mtime = null) {
+ public static function touch($path, $mtime = null) {
return self::$defaultInstance->touch($path, $mtime);
}
/**
* @return string
*/
- static public function file_get_contents($path) {
+ public static function file_get_contents($path) {
return self::$defaultInstance->file_get_contents($path);
}
- static public function file_put_contents($path, $data) {
+ public static function file_put_contents($path, $data) {
return self::$defaultInstance->file_put_contents($path, $data);
}
- static public function unlink($path) {
+ public static function unlink($path) {
return self::$defaultInstance->unlink($path);
}
- static public function rename($path1, $path2) {
+ public static function rename($path1, $path2) {
return self::$defaultInstance->rename($path1, $path2);
}
- static public function copy($path1, $path2) {
+ public static function copy($path1, $path2) {
return self::$defaultInstance->copy($path1, $path2);
}
- static public function fopen($path, $mode) {
+ public static function fopen($path, $mode) {
return self::$defaultInstance->fopen($path, $mode);
}
/**
* @return string
*/
- static public function toTmpFile($path) {
+ public static function toTmpFile($path) {
return self::$defaultInstance->toTmpFile($path);
}
- static public function fromTmpFile($tmpFile, $path) {
+ public static function fromTmpFile($tmpFile, $path) {
return self::$defaultInstance->fromTmpFile($tmpFile, $path);
}
- static public function getMimeType($path) {
+ public static function getMimeType($path) {
return self::$defaultInstance->getMimeType($path);
}
- static public function hash($type, $path, $raw = false) {
+ public static function hash($type, $path, $raw = false) {
return self::$defaultInstance->hash($type, $path, $raw);
}
- static public function free_space($path = '/') {
+ public static function free_space($path = '/') {
return self::$defaultInstance->free_space($path);
}
- static public function search($query) {
+ public static function search($query) {
return self::$defaultInstance->search($query);
}
/**
* @param string $query
*/
- static public function searchByMime($query) {
+ public static function searchByMime($query) {
return self::$defaultInstance->searchByMime($query);
}
@@ -770,7 +770,7 @@ class Filesystem {
* @param string $userId owner of the tags
* @return FileInfo[] array or file info
*/
- static public function searchByTag($tag, $userId) {
+ public static function searchByTag($tag, $userId) {
return self::$defaultInstance->searchByTag($tag, $userId);
}
@@ -781,7 +781,7 @@ class Filesystem {
* @param int $time
* @return bool
*/
- static public function hasUpdated($path, $time) {
+ public static function hasUpdated($path, $time) {
return self::$defaultInstance->hasUpdated($path, $time);
}
@@ -912,7 +912,7 @@ class Filesystem {
* @param string $path
* @return string
*/
- static public function getETag($path) {
+ public static function getETag($path) {
return self::$defaultInstance->getETag($path);
}
}
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 1faa44ad888..a5112bcbba6 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -304,6 +304,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
} else {
return false;
}
+ // no break
case 'w':
case 'wb':
case 'w+':
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 0939dd2a23c..a0a19954a8d 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -49,7 +49,7 @@ trait S3ObjectTrait {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function readObject($urn) {
+ public function readObject($urn) {
return SeekableHttpStream::open(function ($range) use ($urn) {
$command = $this->getConnection()->getCommand('GetObject', [
'Bucket' => $this->bucket,
@@ -81,7 +81,7 @@ trait S3ObjectTrait {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function writeObject($urn, $stream) {
+ public function writeObject($urn, $stream) {
$count = 0;
$countStream = CallbackWrapper::wrap($stream, function ($read) use (&$count) {
$count += $read;
@@ -114,7 +114,7 @@ trait S3ObjectTrait {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function deleteObject($urn) {
+ public function deleteObject($urn) {
$this->getConnection()->deleteObject([
'Bucket' => $this->bucket,
'Key' => $urn,
diff --git a/lib/private/Files/ObjectStore/StorageObjectStore.php b/lib/private/Files/ObjectStore/StorageObjectStore.php
index 0321b7cdf5f..6151214ca70 100644
--- a/lib/private/Files/ObjectStore/StorageObjectStore.php
+++ b/lib/private/Files/ObjectStore/StorageObjectStore.php
@@ -44,7 +44,7 @@ class StorageObjectStore implements IObjectStore {
* @return string the container or bucket name where objects are stored
* @since 7.0.0
*/
- function getStorageId() {
+ public function getStorageId() {
$this->storage->getId();
}
@@ -54,7 +54,7 @@ class StorageObjectStore implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function readObject($urn) {
+ public function readObject($urn) {
$handle = $this->storage->fopen($urn, 'r');
if ($handle) {
return $handle;
@@ -69,7 +69,7 @@ class StorageObjectStore implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function writeObject($urn, $stream) {
+ public function writeObject($urn, $stream) {
$handle = $this->storage->fopen($urn, 'w');
if ($handle) {
stream_copy_to_stream($stream, $handle);
@@ -85,7 +85,7 @@ class StorageObjectStore implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function deleteObject($urn) {
+ public function deleteObject($urn) {
$this->storage->unlink($urn);
}
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index c7d2e691bbd..59446576400 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -56,7 +56,7 @@ class SwiftFactory {
private $container = null;
private $logger;
- const DEFAULT_OPTIONS = [
+ public const DEFAULT_OPTIONS = [
'autocreate' => false,
'urlType' => 'publicURL',
'catalogName' => 'swift',
diff --git a/lib/private/Files/Storage/Flysystem.php b/lib/private/Files/Storage/Flysystem.php
index 2644bfbb1d3..fba64c64250 100644
--- a/lib/private/Files/Storage/Flysystem.php
+++ b/lib/private/Files/Storage/Flysystem.php
@@ -189,6 +189,7 @@ abstract class Flysystem extends Common {
case 'wb':
case 'wb+':
$useExisting = false;
+ // no break
case 'a':
case 'ab':
case 'r+':
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index b949c9103a7..300ba7e7f7c 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -37,7 +37,7 @@ use OCP\IConfig;
* Throws a StorageNotAvailableException for storages with known failures
*/
class Availability extends Wrapper {
- const RECHECK_TTL_SEC = 600; // 10 minutes
+ public const RECHECK_TTL_SEC = 600; // 10 minutes
/** @var IConfig */
protected $config;
diff --git a/lib/private/Files/Stream/Quota.php b/lib/private/Files/Stream/Quota.php
index d0609d7e459..3bf46264b83 100644
--- a/lib/private/Files/Stream/Quota.php
+++ b/lib/private/Files/Stream/Quota.php
@@ -44,7 +44,7 @@ class Quota extends Wrapper {
* @param int $limit
* @return resource
*/
- static public function wrap($stream, $limit) {
+ public static function wrap($stream, $limit) {
$context = stream_context_create([
'quota' => [
'source' => $stream,
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index a729da89fb0..996380037b7 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -61,7 +61,7 @@ use OCP\ILogger;
* @package OC\Files\Utils
*/
class Scanner extends PublicEmitter {
- const MAX_ENTRIES_TO_COMMIT = 10000;
+ public const MAX_ENTRIES_TO_COMMIT = 10000;
/** @var string $user */
private $user;
diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php
index 0f0e2c743e8..ebd8d3620d4 100644
--- a/lib/private/Group/Backend.php
+++ b/lib/private/Group/Backend.php
@@ -32,7 +32,7 @@ abstract class Backend implements \OCP\GroupInterface {
/**
* error code for functions not provided by the group backend
*/
- const NOT_IMPLEMENTED = -501;
+ public const NOT_IMPLEMENTED = -501;
protected $possibleActions = [
self::CREATE_GROUP => 'createGroup',
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index b75dc097c97..1202ba09b13 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -60,8 +60,8 @@ use OCP\IDBConnection;
/**
* Class for group management in a SQL Database (e.g. MySQL, SQLite)
*/
-class Database extends ABackend
- implements IAddToGroupBackend,
+class Database extends ABackend implements
+ IAddToGroupBackend,
ICountDisabledInGroup,
ICountUsersBackend,
ICreateGroupBackend,
diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php
index 880dbf6437c..6950a239678 100644
--- a/lib/private/Group/MetaData.php
+++ b/lib/private/Group/MetaData.php
@@ -35,9 +35,9 @@ use OCP\IGroupManager;
use OCP\IUserSession;
class MetaData {
- const SORT_NONE = 0;
- const SORT_USERCOUNT = 1; // May have performance issues on LDAP backends
- const SORT_GROUPNAME = 2;
+ public const SORT_NONE = 0;
+ public const SORT_USERCOUNT = 1; // May have performance issues on LDAP backends
+ public const SORT_GROUPNAME = 2;
/** @var string */
protected $user;
diff --git a/lib/private/Http/CookieHelper.php b/lib/private/Http/CookieHelper.php
index 7083584bffa..8c20ddb9f65 100644
--- a/lib/private/Http/CookieHelper.php
+++ b/lib/private/Http/CookieHelper.php
@@ -27,9 +27,9 @@ declare(strict_types=1);
namespace OC\Http;
class CookieHelper {
- const SAMESITE_NONE = 0;
- const SAMESITE_LAX = 1;
- const SAMESITE_STRICT = 2;
+ public const SAMESITE_NONE = 0;
+ public const SAMESITE_LAX = 1;
+ public const SAMESITE_STRICT = 2;
public static function setCookie(string $name,
string $value = '',
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index 1084a9e1dd5..af1e3555c32 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -58,7 +58,7 @@ use phpseclib\File\X509;
* @package OC\IntegrityCheck
*/
class Checker {
- const CACHE_KEY = 'oc.integritycheck.checker';
+ public const CACHE_KEY = 'oc.integritycheck.checker';
/** @var EnvironmentHelper */
private $environmentHelper;
/** @var AppLocator */
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index a1afb1f4f0a..03240f48410 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -72,7 +72,7 @@ class Factory implements IFactory {
*/
protected $pluralFunctions = [];
- const COMMON_LANGUAGE_CODES = [
+ public const COMMON_LANGUAGE_CODES = [
'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it',
'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
];
diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php
index 0670ac56503..a03ec114ef9 100644
--- a/lib/private/L10N/LanguageIterator.php
+++ b/lib/private/L10N/LanguageIterator.php
@@ -64,6 +64,7 @@ class LanguageIterator implements ILanguageIterator {
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
+ // no break
case 1:
$forcedLang = $this->config->getSystemValue('force_language', false);
if (is_string($forcedLang)
@@ -73,6 +74,7 @@ class LanguageIterator implements ILanguageIterator {
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
+ // no break
case 2:
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
if (is_string($userLang)) {
@@ -80,6 +82,7 @@ class LanguageIterator implements ILanguageIterator {
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
+ // no break
case 3:
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
if (is_string($userLang)
@@ -88,6 +91,7 @@ class LanguageIterator implements ILanguageIterator {
return $truncated;
}
$this->next();
+ // no break
case 4:
return $this->config->getSystemValue('default_language', 'en');
/** @noinspection PhpMissingBreakStatementInspection */
@@ -97,6 +101,7 @@ class LanguageIterator implements ILanguageIterator {
return $truncated;
}
$this->next();
+ // no break
default:
return 'en';
}
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index c24657a5c9c..2a6a6714eb3 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -37,13 +37,13 @@ class LargeFileHelper {
* pow(2, 53) as a base-10 string.
* @var string
*/
- const POW_2_53 = '9007199254740992';
+ public const POW_2_53 = '9007199254740992';
/**
* pow(2, 53) - 1 as a base-10 string.
* @var string
*/
- const POW_2_53_MINUS_1 = '9007199254740991';
+ public const POW_2_53_MINUS_1 = '9007199254740991';
/**
* @brief Checks whether our assumptions hold on the PHP platform we are on.
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 50544d7149c..237d33cfefa 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -32,7 +32,7 @@ use OC\HintException;
use OC\Setup;
class ExceptionSerializer {
- const methodsWithSensitiveParameters = [
+ public const methodsWithSensitiveParameters = [
// Session/User
'completeLogin',
'login',
@@ -86,7 +86,7 @@ class ExceptionSerializer {
'update',
];
- const methodsWithSensitiveParametersByClass = [
+ public const methodsWithSensitiveParametersByClass = [
SetupController::class => [
'run',
'display',
diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php
index 3523ea2a86b..5886f75731a 100644
--- a/lib/private/Memcache/APCu.php
+++ b/lib/private/Memcache/APCu.php
@@ -150,7 +150,7 @@ class APCu extends Cache implements IMemcache {
/**
* @return bool
*/
- static public function isAvailable() {
+ public static function isAvailable() {
if (!extension_loaded('apcu')) {
return false;
} elseif (!\OC::$server->getIniWrapper()->getBool('apc.enabled')) {
diff --git a/lib/private/Memcache/ArrayCache.php b/lib/private/Memcache/ArrayCache.php
index 407f4af06f4..8c91d9fcbbb 100644
--- a/lib/private/Memcache/ArrayCache.php
+++ b/lib/private/Memcache/ArrayCache.php
@@ -154,7 +154,7 @@ class ArrayCache extends Cache implements IMemcache {
/**
* {@inheritDoc}
*/
- static public function isAvailable() {
+ public static function isAvailable() {
return true;
}
}
diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php
index 0e6552ba436..52c5af4ef98 100644
--- a/lib/private/Memcache/Factory.php
+++ b/lib/private/Memcache/Factory.php
@@ -36,7 +36,7 @@ use OCP\ILogger;
use OCP\IMemcache;
class Factory implements ICacheFactory {
- const NULL_CACHE = NullCache::class;
+ public const NULL_CACHE = NullCache::class;
/**
* @var string $globalPrefix
diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php
index e3fc1b35f1a..eff76a41c45 100644
--- a/lib/private/Memcache/Memcached.php
+++ b/lib/private/Memcache/Memcached.php
@@ -210,7 +210,7 @@ class Memcached extends Cache implements IMemcache {
return $result;
}
- static public function isAvailable() {
+ public static function isAvailable() {
return extension_loaded('memcached');
}
diff --git a/lib/private/Memcache/NullCache.php b/lib/private/Memcache/NullCache.php
index 371c9381f56..6ea90e9045b 100644
--- a/lib/private/Memcache/NullCache.php
+++ b/lib/private/Memcache/NullCache.php
@@ -67,7 +67,7 @@ class NullCache extends Cache implements \OCP\IMemcache {
return true;
}
- static public function isAvailable() {
+ public static function isAvailable() {
return true;
}
}
diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php
index 7023c6b7871..af1a6864b43 100644
--- a/lib/private/Memcache/Redis.php
+++ b/lib/private/Memcache/Redis.php
@@ -174,7 +174,7 @@ class Redis extends Cache implements IMemcacheTTL {
self::$cache->expire($this->getNameSpace() . $key, $ttl);
}
- static public function isAvailable() {
+ public static function isAvailable() {
return \OC::$server->getGetRedisFactory()->isAvailable();
}
}
diff --git a/lib/private/MemoryInfo.php b/lib/private/MemoryInfo.php
index 520225fc6d1..88ba69aae95 100644
--- a/lib/private/MemoryInfo.php
+++ b/lib/private/MemoryInfo.php
@@ -30,7 +30,7 @@ namespace OC;
* Helper class that covers memory info.
*/
class MemoryInfo {
- const RECOMMENDED_MEMORY_LIMIT = 512 * 1024 * 1024;
+ public const RECOMMENDED_MEMORY_LIMIT = 512 * 1024 * 1024;
/**
* Tests if the memory limit is greater or equal the recommended value.
@@ -72,8 +72,10 @@ class MemoryInfo {
switch ($last) {
case 'g':
$memoryLimit *= 1024;
+ // no break
case 'm':
$memoryLimit *= 1024;
+ // no break
case 'k':
$memoryLimit *= 1024;
}
diff --git a/lib/private/Remote/User.php b/lib/private/Remote/User.php
index 5519d7dc22f..31ded598b7c 100644
--- a/lib/private/Remote/User.php
+++ b/lib/private/Remote/User.php
@@ -26,7 +26,7 @@ namespace OC\Remote;
use OCP\Remote\IUser;
class User implements IUser {
- const EXPECTED_KEYS = [
+ public const EXPECTED_KEYS = [
'id',
'email',
'displayname',
diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
index 6dd49e6c9fd..6eccf53c5a8 100644
--- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php
+++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
@@ -35,7 +35,7 @@ use OCP\PreConditionNotMetException;
* before the data structure is changed and the information is gone
*/
class SaveAccountsTableData implements IRepairStep {
- const BATCH_SIZE = 75;
+ public const BATCH_SIZE = 75;
/** @var IDBConnection */
protected $db;
diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php
index becf8ba7594..a0fe246571a 100644
--- a/lib/private/Repair/RepairInvalidShares.php
+++ b/lib/private/Repair/RepairInvalidShares.php
@@ -32,7 +32,7 @@ use OCP\Migration\IRepairStep;
* Repairs shares with invalid data
*/
class RepairInvalidShares implements IRepairStep {
- const CHUNK_SIZE = 200;
+ public const CHUNK_SIZE = 200;
/** @var \OCP\IConfig */
protected $config;
diff --git a/lib/private/Search/Result/File.php b/lib/private/Search/Result/File.php
index b0f6b3df622..242bf7cb953 100644
--- a/lib/private/Search/Result/File.php
+++ b/lib/private/Search/Result/File.php
@@ -97,7 +97,7 @@ class File extends \OCP\Search\Result {
/**
* @var Folder $userFolderCache
*/
- static protected $userFolderCache = null;
+ protected static $userFolderCache = null;
/**
* converts a path relative to the users files folder
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php
index c04e0e1b383..d1fead6759f 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -48,7 +48,7 @@ use OCP\ILogger;
* @package OC\Security\Bruteforce
*/
class Throttler {
- const LOGIN_ACTION = 'login';
+ public const LOGIN_ACTION = 'login';
/** @var IDBConnection */
private $db;
diff --git a/lib/private/Security/CredentialsManager.php b/lib/private/Security/CredentialsManager.php
index ab06a807613..770919dacd7 100644
--- a/lib/private/Security/CredentialsManager.php
+++ b/lib/private/Security/CredentialsManager.php
@@ -33,7 +33,7 @@ use OCP\Security\ICrypto;
* @package OC\Security
*/
class CredentialsManager implements ICredentialsManager {
- const DB_TABLE = 'credentials';
+ public const DB_TABLE = 'credentials';
/** @var ICrypto */
protected $crypto;
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 629673418f7..1a3eabc852e 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -1971,14 +1971,14 @@ class Server extends ServerContainer implements IServerContainer {
/**
* @return IMountManager
**/
- function getMountManager() {
+ public function getMountManager() {
return $this->query(IMountManager::class);
}
/**
* @return IUserMountCache
*/
- function getUserMountCache() {
+ public function getUserMountCache() {
return $this->query(IUserMountCache::class);
}
diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php
index 892c2436040..fc7693b71b2 100644
--- a/lib/private/Session/CryptoSessionData.php
+++ b/lib/private/Session/CryptoSessionData.php
@@ -50,7 +50,7 @@ class CryptoSessionData implements \ArrayAccess, ISession {
protected $sessionValues;
/** @var bool */
protected $isModified = false;
- const encryptedSessionName = 'encrypted_session_data';
+ public const encryptedSessionName = 'encrypted_session_data';
/**
* @param ISession $session
diff --git a/lib/private/Session/CryptoWrapper.php b/lib/private/Session/CryptoWrapper.php
index bb82652a01d..f4d30bee145 100644
--- a/lib/private/Session/CryptoWrapper.php
+++ b/lib/private/Session/CryptoWrapper.php
@@ -48,7 +48,7 @@ use OCP\Security\ISecureRandom;
* @package OC\Session
*/
class CryptoWrapper {
- const COOKIE_NAME = 'oc_sessionPassphrase';
+ public const COOKIE_NAME = 'oc_sessionPassphrase';
/** @var IConfig */
protected $config;
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index afdc881b482..3fc8415e29a 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -105,7 +105,7 @@ class Setup {
$this->installer = $installer;
}
- static protected $dbSetupClasses = [
+ protected static $dbSetupClasses = [
'mysql' => \OC\Setup\MySQL::class,
'pgsql' => \OC\Setup\PostgreSQL::class,
'oci' => \OC\Setup\OCI::class,
diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php
index d1b47f1dd47..18f6864b6c9 100644
--- a/lib/private/Share/Constants.php
+++ b/lib/private/Share/Constants.php
@@ -37,50 +37,50 @@ class Constants {
/**
* @deprecated 17.0.0 - use IShare::TYPE_USER instead
*/
- const SHARE_TYPE_USER = 0;
+ public const SHARE_TYPE_USER = 0;
/**
* @deprecated 17.0.0 - use IShare::TYPE_GROUP instead
*/
- const SHARE_TYPE_GROUP = 1;
+ public const SHARE_TYPE_GROUP = 1;
// const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider
/**
* @deprecated 17.0.0 - use IShare::TYPE_LINK instead
*/
- const SHARE_TYPE_LINK = 3;
+ public const SHARE_TYPE_LINK = 3;
/**
* @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead
*/
- const SHARE_TYPE_EMAIL = 4;
- const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
+ public const SHARE_TYPE_EMAIL = 4;
+ public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
/**
* @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead
*/
- const SHARE_TYPE_REMOTE = 6;
+ public const SHARE_TYPE_REMOTE = 6;
/**
* @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead
*/
- const SHARE_TYPE_CIRCLE = 7;
+ public const SHARE_TYPE_CIRCLE = 7;
/**
* @deprecated 17.0.0 - use IShare::TYPE_GUEST instead
*/
- const SHARE_TYPE_GUEST = 8;
+ public const SHARE_TYPE_GUEST = 8;
/**
* @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead
*/
- const SHARE_TYPE_REMOTE_GROUP = 9;
+ public const SHARE_TYPE_REMOTE_GROUP = 9;
/**
* @deprecated 17.0.0 - use IShare::TYPE_ROOM instead
*/
- const SHARE_TYPE_ROOM = 10;
+ public const SHARE_TYPE_ROOM = 10;
// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
- const FORMAT_NONE = -1;
- const FORMAT_STATUSES = -2;
- const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
+ public const FORMAT_NONE = -1;
+ public const FORMAT_STATUSES = -2;
+ public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
- const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
+ public const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
- const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
+ public const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
protected static $shareTypeUserAndGroups = -1;
protected static $shareTypeGroupUserUnique = 2;
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 41a727593b3..75745a7fe97 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -63,7 +63,7 @@ use OCP\Share\IShareProvider;
class DefaultShareProvider implements IShareProvider {
// Special share type for user modified group shares
- const SHARE_TYPE_USERGROUP = 2;
+ public const SHARE_TYPE_USERGROUP = 2;
/** @var IDBConnection */
private $dbConn;
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index 2d7b1bc3ae4..a718a007e34 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -44,8 +44,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
* Manager class for system tags
*/
class SystemTagManager implements ISystemTagManager {
- const TAG_TABLE = 'systemtag';
- const TAG_GROUP_TABLE = 'systemtag_group';
+ public const TAG_TABLE = 'systemtag';
+ public const TAG_GROUP_TABLE = 'systemtag_group';
/** @var IDBConnection */
protected $connection;
diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php
index eb33d2d30bb..c6d6d09b95a 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -38,7 +38,7 @@ use OCP\SystemTag\TagNotFoundException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class SystemTagObjectMapper implements ISystemTagObjectMapper {
- const RELATION_TABLE = 'systemtag_object_mapping';
+ public const RELATION_TABLE = 'systemtag_object_mapping';
/** @var ISystemTagManager */
protected $tagManager;
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index a176967bd2b..6d06b3a4829 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -112,8 +112,8 @@ class Tags implements ITags {
*/
private $backend;
- const TAG_TABLE = '*PREFIX*vcategory';
- const RELATION_TABLE = '*PREFIX*vcategory_to_object';
+ public const TAG_TABLE = '*PREFIX*vcategory';
+ public const RELATION_TABLE = '*PREFIX*vcategory_to_object';
/**
* Constructor.
diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php
index 13735d69d47..8b47193feaa 100644
--- a/lib/private/TempManager.php
+++ b/lib/private/TempManager.php
@@ -45,7 +45,7 @@ class TempManager implements ITempManager {
protected $config;
/** Prefix */
- const TMP_PREFIX = 'oc_tmp_';
+ public const TMP_PREFIX = 'oc_tmp_';
/**
* @param \OCP\ILogger $logger
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 89904827b2a..ddddb8704c8 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -287,7 +287,7 @@ class TemplateLayout extends \OC_Template {
* @param array $styles
* @return array
*/
- static public function findStylesheetFiles($styles, $compileScss = true) {
+ public static function findStylesheetFiles($styles, $compileScss = true) {
// Read the selected theme from the config file
$theme = \OC_Util::getTheme();
@@ -328,7 +328,7 @@ class TemplateLayout extends \OC_Template {
* @param array $scripts
* @return array
*/
- static public function findJavascriptFiles($scripts) {
+ public static function findJavascriptFiles($scripts) {
// Read the selected theme from the config file
$theme = \OC_Util::getTheme();
diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php
index 8700b9609d2..cde7517d3c5 100644
--- a/lib/private/Updater/ChangesCheck.php
+++ b/lib/private/Updater/ChangesCheck.php
@@ -40,9 +40,9 @@ class ChangesCheck {
/** @var ILogger */
private $logger;
- const RESPONSE_NO_CONTENT = 0;
- const RESPONSE_USE_CACHE = 1;
- const RESPONSE_HAS_CONTENT = 2;
+ public const RESPONSE_NO_CONTENT = 0;
+ public const RESPONSE_USE_CACHE = 1;
+ public const RESPONSE_HAS_CONTENT = 2;
public function __construct(IClientService $clientService, ChangesMapper $mapper, ILogger $logger) {
$this->clientService = $clientService;
diff --git a/lib/private/Updater/ChangesMapper.php b/lib/private/Updater/ChangesMapper.php
index b79eadbff58..b3b578f61e1 100644
--- a/lib/private/Updater/ChangesMapper.php
+++ b/lib/private/Updater/ChangesMapper.php
@@ -32,7 +32,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
class ChangesMapper extends QBMapper {
- const TABLE_NAME = 'whats_new';
+ public const TABLE_NAME = 'whats_new';
public function __construct(IDBConnection $db) {
parent::__construct($db, self::TABLE_NAME);
diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php
index 354e1c3fd71..477448279a5 100644
--- a/lib/private/User/Backend.php
+++ b/lib/private/User/Backend.php
@@ -34,19 +34,19 @@ abstract class Backend implements UserInterface {
/**
* error code for functions not provided by the user backend
*/
- const NOT_IMPLEMENTED = -501;
+ public const NOT_IMPLEMENTED = -501;
/**
* actions that user backends can define
*/
- const CREATE_USER = 1; // 1 << 0
- const SET_PASSWORD = 16; // 1 << 4
- const CHECK_PASSWORD = 256; // 1 << 8
- const GET_HOME = 4096; // 1 << 12
- const GET_DISPLAYNAME = 65536; // 1 << 16
- const SET_DISPLAYNAME = 1048576; // 1 << 20
- const PROVIDE_AVATAR = 16777216; // 1 << 24
- const COUNT_USERS = 268435456; // 1 << 28
+ public const CREATE_USER = 1; // 1 << 0
+ public const SET_PASSWORD = 16; // 1 << 4
+ public const CHECK_PASSWORD = 256; // 1 << 8
+ public const GET_HOME = 4096; // 1 << 12
+ public const GET_DISPLAYNAME = 65536; // 1 << 16
+ public const SET_DISPLAYNAME = 1048576; // 1 << 20
+ public const PROVIDE_AVATAR = 16777216; // 1 << 24
+ public const COUNT_USERS = 268435456; // 1 << 28
protected $possibleActions = [
self::CREATE_USER => 'createUser',
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index d5098483d61..e88549c8d81 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -76,8 +76,8 @@ use OCP\User\Backend\ISetPasswordBackend;
/**
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
*/
-class Database extends ABackend
- implements ICreateUserBackend,
+class Database extends ABackend implements
+ ICreateUserBackend,
ISetPasswordBackend,
ISetDisplayNameBackend,
IGetDisplayNameBackend,
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 5c06f66a20a..2454d6be4f0 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -65,14 +65,14 @@ use OCP\ILogger;
* upgrading and removing apps.
*/
class OC_App {
- static private $adminForms = [];
- static private $personalForms = [];
- static private $appTypes = [];
- static private $loadedApps = [];
- static private $altLogin = [];
- static private $alreadyRegistered = [];
- const supportedApp = 300;
- const officialApp = 200;
+ private static $adminForms = [];
+ private static $personalForms = [];
+ private static $appTypes = [];
+ private static $loadedApps = [];
+ private static $altLogin = [];
+ private static $alreadyRegistered = [];
+ public const supportedApp = 300;
+ public const officialApp = 200;
/**
* clean the appId
diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php
index 63f1447ad91..1d2e9bd1429 100644
--- a/lib/private/legacy/OC_DB.php
+++ b/lib/private/legacy/OC_DB.php
@@ -58,7 +58,7 @@ class OC_DB {
*
* SQL query via Doctrine prepare(), needs to be execute()'d!
*/
- static public function prepare($query , $limit = null, $offset = null, $isManipulation = null) {
+ public static function prepare($query , $limit = null, $offset = null, $isManipulation = null) {
$connection = \OC::$server->getDatabaseConnection();
if ($isManipulation === null) {
@@ -84,7 +84,7 @@ class OC_DB {
* @param string $sql
* @return bool
*/
- static public function isManipulation($sql) {
+ public static function isManipulation($sql) {
$selectOccurrence = stripos($sql, 'SELECT');
if ($selectOccurrence !== false && $selectOccurrence < 10) {
return false;
@@ -113,7 +113,7 @@ class OC_DB {
* @return OC_DB_StatementWrapper
* @throws \OC\DatabaseException
*/
- static public function executeAudited($stmt, array $parameters = []) {
+ public static function executeAudited($stmt, array $parameters = []) {
if (is_string($stmt)) {
// convert to an array with 'sql'
if (stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT
diff --git a/lib/private/legacy/OC_FileChunking.php b/lib/private/legacy/OC_FileChunking.php
index 37cf42a31cb..188023a960a 100644
--- a/lib/private/legacy/OC_FileChunking.php
+++ b/lib/private/legacy/OC_FileChunking.php
@@ -40,7 +40,7 @@ class OC_FileChunking {
*/
protected $ttl;
- static public function decodeName($name) {
+ public static function decodeName($name) {
preg_match('/(?P<name>.*)-chunking-(?P<transferid>\d+)-(?P<chunkcount>\d+)-(?P<index>\d+)/', $name, $matches);
return $matches;
}
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index e046a577026..ddb824cd6cd 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -50,11 +50,11 @@ use OCP\Lock\ILockingProvider;
*
*/
class OC_Files {
- const FILE = 1;
- const ZIP_FILES = 2;
- const ZIP_DIR = 3;
+ public const FILE = 1;
+ public const ZIP_FILES = 2;
+ public const ZIP_DIR = 3;
- const UPLOAD_MIN_LIMIT_BYTES = 1048576; // 1 MiB
+ public const UPLOAD_MIN_LIMIT_BYTES = 1048576; // 1 MiB
private static $multipartBoundary = '';
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 3439d1f8936..8cd492de117 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -135,7 +135,7 @@ class OC_Helper {
* @param string $dest target folder
*
*/
- static function copyr($src, $dest) {
+ public static function copyr($src, $dest) {
if (is_dir($src)) {
if (!is_dir($dest)) {
mkdir($dest);
@@ -157,7 +157,7 @@ class OC_Helper {
* @param bool $deleteSelf if set to false only the content of the folder will be deleted
* @return bool
*/
- static function rmdirr($dir, $deleteSelf = true) {
+ public static function rmdirr($dir, $deleteSelf = true) {
if (is_dir($dir)) {
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
@@ -193,7 +193,7 @@ class OC_Helper {
* @deprecated 18.0.0
* @return \OC\Files\Type\TemplateManager
*/
- static public function getFileTemplateManager() {
+ public static function getFileTemplateManager() {
if (!self::$templateManager) {
self::$templateManager = new \OC\Files\Type\TemplateManager();
}
diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php
index fe08266fe5b..980eb609259 100644
--- a/lib/private/legacy/OC_Hook.php
+++ b/lib/private/legacy/OC_Hook.php
@@ -36,7 +36,7 @@
class OC_Hook {
public static $thrownExceptions = [];
- static private $registered = [];
+ private static $registered = [];
/**
* connects a function to a hook
@@ -51,7 +51,7 @@ class OC_Hook {
*
* TODO: write example
*/
- static public function connect($signalClass, $signalName, $slotClass, $slotName) {
+ public static function connect($signalClass, $signalName, $slotClass, $slotName) {
// If we're trying to connect to an emitting class that isn't
// yet registered, register it
if (!array_key_exists($signalClass, self::$registered)) {
@@ -91,7 +91,7 @@ class OC_Hook {
*
* TODO: write example
*/
- static public function emit($signalClass, $signalName, $params = []) {
+ public static function emit($signalClass, $signalName, $params = []) {
// Return false if no hook handlers are listening to this
// emitting class
@@ -129,7 +129,7 @@ class OC_Hook {
* @param string $signalClass
* @param string $signalName
*/
- static public function clear($signalClass='', $signalName='') {
+ public static function clear($signalClass='', $signalName='') {
if ($signalClass) {
if ($signalName) {
self::$registered[$signalClass][$signalName]=[];
@@ -145,7 +145,7 @@ class OC_Hook {
* DO NOT USE!
* For unit tests ONLY!
*/
- static public function getHooks() {
+ public static function getHooks() {
return self::$registered;
}
}
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php
index b8d3d162cc8..9ef77e3d4c6 100644
--- a/lib/private/legacy/OC_Image.php
+++ b/lib/private/legacy/OC_Image.php
@@ -1128,7 +1128,6 @@ class OC_Image implements \OCP\IImage {
* @return bool
*/
public function copyResize($maxSize): IImage {
-
}
/**
diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php
index bbeb6258109..89f0ee5247b 100644
--- a/lib/private/legacy/OC_Response.php
+++ b/lib/private/legacy/OC_Response.php
@@ -33,7 +33,7 @@ class OC_Response {
* @param string $filename file name
* @param string $type disposition type, either 'attachment' or 'inline'
*/
- static public function setContentDispositionHeader($filename, $type = 'attachment') {
+ public static function setContentDispositionHeader($filename, $type = 'attachment') {
if (\OC::$server->getRequest()->isUserAgent(
[
\OC\AppFramework\Http\Request::USER_AGENT_IE,
@@ -51,7 +51,7 @@ class OC_Response {
* Sets the content length header (with possible workarounds)
* @param string|int|float $length Length to be sent
*/
- static public function setContentLengthHeader($length) {
+ public static function setContentLengthHeader($length) {
if (PHP_INT_SIZE === 4) {
if ($length > PHP_INT_MAX && stripos(PHP_SAPI, 'apache') === 0) {
// Apache PHP SAPI casts Content-Length headers to PHP integers.
diff --git a/lib/public/API.php b/lib/public/API.php
index ce09a4349a9..e1ccd3d02a1 100644
--- a/lib/public/API.php
+++ b/lib/public/API.php
@@ -44,8 +44,8 @@ class API {
* API Response Codes
* @since 8.1.0
*/
- const RESPOND_UNAUTHORISED = 997;
- const RESPOND_SERVER_ERROR = 996;
- const RESPOND_NOT_FOUND = 998;
- const RESPOND_UNKNOWN_ERROR = 999;
+ public const RESPOND_UNAUTHORISED = 997;
+ public const RESPOND_SERVER_ERROR = 996;
+ public const RESPOND_NOT_FOUND = 998;
+ public const RESPOND_UNKNOWN_ERROR = 999;
}
diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php
index 9d02e0b43c0..23af0f8b0b1 100644
--- a/lib/public/Accounts/IAccountManager.php
+++ b/lib/public/Accounts/IAccountManager.php
@@ -38,23 +38,23 @@ use OCP\IUser;
interface IAccountManager {
/** nobody can see my account details */
- const VISIBILITY_PRIVATE = 'private';
+ public const VISIBILITY_PRIVATE = 'private';
/** only contacts, especially trusted servers can see my contact details */
- const VISIBILITY_CONTACTS_ONLY = 'contacts';
+ public const VISIBILITY_CONTACTS_ONLY = 'contacts';
/** every body ca see my contact detail, will be published to the lookup server */
- const VISIBILITY_PUBLIC = 'public';
+ public const VISIBILITY_PUBLIC = 'public';
- const PROPERTY_AVATAR = 'avatar';
- const PROPERTY_DISPLAYNAME = 'displayname';
- const PROPERTY_PHONE = 'phone';
- const PROPERTY_EMAIL = 'email';
- const PROPERTY_WEBSITE = 'website';
- const PROPERTY_ADDRESS = 'address';
- const PROPERTY_TWITTER = 'twitter';
+ public const PROPERTY_AVATAR = 'avatar';
+ public const PROPERTY_DISPLAYNAME = 'displayname';
+ public const PROPERTY_PHONE = 'phone';
+ public const PROPERTY_EMAIL = 'email';
+ public const PROPERTY_WEBSITE = 'website';
+ public const PROPERTY_ADDRESS = 'address';
+ public const PROPERTY_TWITTER = 'twitter';
- const NOT_VERIFIED = '0';
- const VERIFICATION_IN_PROGRESS = '1';
- const VERIFIED = '2';
+ public const NOT_VERIFIED = '0';
+ public const VERIFICATION_IN_PROGRESS = '1';
+ public const VERIFIED = '2';
/**
* Get the account data for a given user
diff --git a/lib/public/Activity/IExtension.php b/lib/public/Activity/IExtension.php
index c470ef07e04..5ba09507cbf 100644
--- a/lib/public/Activity/IExtension.php
+++ b/lib/public/Activity/IExtension.php
@@ -32,12 +32,12 @@ namespace OCP\Activity;
* @since 8.0.0
*/
interface IExtension {
- const METHOD_STREAM = 'stream';
- const METHOD_MAIL = 'email';
+ public const METHOD_STREAM = 'stream';
+ public const METHOD_MAIL = 'email';
- const PRIORITY_VERYLOW = 10;
- const PRIORITY_LOW = 20;
- const PRIORITY_MEDIUM = 30;
- const PRIORITY_HIGH = 40;
- const PRIORITY_VERYHIGH = 50;
+ public const PRIORITY_VERYLOW = 10;
+ public const PRIORITY_LOW = 20;
+ public const PRIORITY_MEDIUM = 30;
+ public const PRIORITY_HIGH = 40;
+ public const PRIORITY_VERYHIGH = 50;
}
diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php
index e98ada424c6..b44cd3a5dcc 100644
--- a/lib/public/App/ManagerEvent.php
+++ b/lib/public/App/ManagerEvent.php
@@ -32,14 +32,14 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class ManagerEvent extends Event {
- const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp';
- const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups';
- const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp';
+ public const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp';
+ public const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups';
+ public const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp';
/**
* @since 9.1.0
*/
- const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp';
+ public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp';
/** @var string */
protected $event;
diff --git a/lib/public/AppFramework/Http.php b/lib/public/AppFramework/Http.php
index e0b910325a0..1106c58af85 100644
--- a/lib/public/AppFramework/Http.php
+++ b/lib/public/AppFramework/Http.php
@@ -34,63 +34,63 @@ namespace OCP\AppFramework;
* @since 6.0.0
*/
class Http {
- const STATUS_CONTINUE = 100;
- const STATUS_SWITCHING_PROTOCOLS = 101;
- const STATUS_PROCESSING = 102;
- const STATUS_OK = 200;
- const STATUS_CREATED = 201;
- const STATUS_ACCEPTED = 202;
- const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
- const STATUS_NO_CONTENT = 204;
- const STATUS_RESET_CONTENT = 205;
- const STATUS_PARTIAL_CONTENT = 206;
- const STATUS_MULTI_STATUS = 207;
- const STATUS_ALREADY_REPORTED = 208;
- const STATUS_IM_USED = 226;
- const STATUS_MULTIPLE_CHOICES = 300;
- const STATUS_MOVED_PERMANENTLY = 301;
- const STATUS_FOUND = 302;
- const STATUS_SEE_OTHER = 303;
- const STATUS_NOT_MODIFIED = 304;
- const STATUS_USE_PROXY = 305;
- const STATUS_RESERVED = 306;
- const STATUS_TEMPORARY_REDIRECT = 307;
- const STATUS_BAD_REQUEST = 400;
- const STATUS_UNAUTHORIZED = 401;
- const STATUS_PAYMENT_REQUIRED = 402;
- const STATUS_FORBIDDEN = 403;
- const STATUS_NOT_FOUND = 404;
- const STATUS_METHOD_NOT_ALLOWED = 405;
- const STATUS_NOT_ACCEPTABLE = 406;
- const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
- const STATUS_REQUEST_TIMEOUT = 408;
- const STATUS_CONFLICT = 409;
- const STATUS_GONE = 410;
- const STATUS_LENGTH_REQUIRED = 411;
- const STATUS_PRECONDITION_FAILED = 412;
- const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
- const STATUS_REQUEST_URI_TOO_LONG = 414;
- const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
- const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
- const STATUS_EXPECTATION_FAILED = 417;
- const STATUS_IM_A_TEAPOT = 418;
- const STATUS_UNPROCESSABLE_ENTITY = 422;
- const STATUS_LOCKED = 423;
- const STATUS_FAILED_DEPENDENCY = 424;
- const STATUS_UPGRADE_REQUIRED = 426;
- const STATUS_PRECONDITION_REQUIRED = 428;
- const STATUS_TOO_MANY_REQUESTS = 429;
- const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
- const STATUS_INTERNAL_SERVER_ERROR = 500;
- const STATUS_NOT_IMPLEMENTED = 501;
- const STATUS_BAD_GATEWAY = 502;
- const STATUS_SERVICE_UNAVAILABLE = 503;
- const STATUS_GATEWAY_TIMEOUT = 504;
- const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
- const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
- const STATUS_INSUFFICIENT_STORAGE = 507;
- const STATUS_LOOP_DETECTED = 508;
- const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
- const STATUS_NOT_EXTENDED = 510;
- const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
+ public const STATUS_CONTINUE = 100;
+ public const STATUS_SWITCHING_PROTOCOLS = 101;
+ public const STATUS_PROCESSING = 102;
+ public const STATUS_OK = 200;
+ public const STATUS_CREATED = 201;
+ public const STATUS_ACCEPTED = 202;
+ public const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
+ public const STATUS_NO_CONTENT = 204;
+ public const STATUS_RESET_CONTENT = 205;
+ public const STATUS_PARTIAL_CONTENT = 206;
+ public const STATUS_MULTI_STATUS = 207;
+ public const STATUS_ALREADY_REPORTED = 208;
+ public const STATUS_IM_USED = 226;
+ public const STATUS_MULTIPLE_CHOICES = 300;
+ public const STATUS_MOVED_PERMANENTLY = 301;
+ public const STATUS_FOUND = 302;
+ public const STATUS_SEE_OTHER = 303;
+ public const STATUS_NOT_MODIFIED = 304;
+ public const STATUS_USE_PROXY = 305;
+ public const STATUS_RESERVED = 306;
+ public const STATUS_TEMPORARY_REDIRECT = 307;
+ public const STATUS_BAD_REQUEST = 400;
+ public const STATUS_UNAUTHORIZED = 401;
+ public const STATUS_PAYMENT_REQUIRED = 402;
+ public const STATUS_FORBIDDEN = 403;
+ public const STATUS_NOT_FOUND = 404;
+ public const STATUS_METHOD_NOT_ALLOWED = 405;
+ public const STATUS_NOT_ACCEPTABLE = 406;
+ public const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
+ public const STATUS_REQUEST_TIMEOUT = 408;
+ public const STATUS_CONFLICT = 409;
+ public const STATUS_GONE = 410;
+ public const STATUS_LENGTH_REQUIRED = 411;
+ public const STATUS_PRECONDITION_FAILED = 412;
+ public const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
+ public const STATUS_REQUEST_URI_TOO_LONG = 414;
+ public const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
+ public const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
+ public const STATUS_EXPECTATION_FAILED = 417;
+ public const STATUS_IM_A_TEAPOT = 418;
+ public const STATUS_UNPROCESSABLE_ENTITY = 422;
+ public const STATUS_LOCKED = 423;
+ public const STATUS_FAILED_DEPENDENCY = 424;
+ public const STATUS_UPGRADE_REQUIRED = 426;
+ public const STATUS_PRECONDITION_REQUIRED = 428;
+ public const STATUS_TOO_MANY_REQUESTS = 429;
+ public const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
+ public const STATUS_INTERNAL_SERVER_ERROR = 500;
+ public const STATUS_NOT_IMPLEMENTED = 501;
+ public const STATUS_BAD_GATEWAY = 502;
+ public const STATUS_SERVICE_UNAVAILABLE = 503;
+ public const STATUS_GATEWAY_TIMEOUT = 504;
+ public const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
+ public const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
+ public const STATUS_INSUFFICIENT_STORAGE = 507;
+ public const STATUS_LOOP_DETECTED = 508;
+ public const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
+ public const STATUS_NOT_EXTENDED = 510;
+ public const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
}
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index 283189a774a..d6c4006433c 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -38,8 +38,8 @@ namespace OCP\AppFramework\Http;
* @since 6.0.0
*/
class TemplateResponse extends Response {
- const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
- const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
+ public const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
+ public const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
/**
* name of the template
diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php
index 4de49340b7d..d2f5df2e3eb 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php
@@ -37,8 +37,8 @@ interface IProvider {
/**
* @since 14.0.0
*/
- const EVENT_SUCCESS = self::class . '::success';
- const EVENT_FAILED = self::class . '::failed';
+ public const EVENT_SUCCESS = self::class . '::success';
+ public const EVENT_FAILED = self::class . '::failed';
/**
* Get unique identifier of this 2FA provider
diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
index 77aad28620b..c98feee2545 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -39,8 +39,8 @@ use OCP\IUser;
* @since 14.0.0
*/
interface IRegistry {
- const EVENT_PROVIDER_ENABLED = self::class . '::enable';
- const EVENT_PROVIDER_DISABLED = self::class . '::disable';
+ public const EVENT_PROVIDER_ENABLED = self::class . '::enable';
+ public const EVENT_PROVIDER_DISABLED = self::class . '::disable';
/**
* Get a key-value map of providers and their enabled/disabled state for
diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php
index 53ccd87f08d..9644c9119a6 100644
--- a/lib/public/Comments/CommentsEntityEvent.php
+++ b/lib/public/Comments/CommentsEntityEvent.php
@@ -32,7 +32,7 @@ use OCP\EventDispatcher\Event;
* @since 9.1.0
*/
class CommentsEntityEvent extends Event {
- const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity';
+ public const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity';
/** @var string */
protected $event;
diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php
index b2116eb51ec..313df7e2ff7 100644
--- a/lib/public/Comments/CommentsEvent.php
+++ b/lib/public/Comments/CommentsEvent.php
@@ -32,10 +32,10 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class CommentsEvent extends Event {
- const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment';
- const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment';
- const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment';
- const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment';
+ public const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment';
+ public const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment';
+ public const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment';
+ public const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment';
/** @var string */
protected $event;
diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php
index 604aaefd890..fdf789b6637 100644
--- a/lib/public/Comments/IComment.php
+++ b/lib/public/Comments/IComment.php
@@ -34,7 +34,7 @@ namespace OCP\Comments;
* @since 9.0.0
*/
interface IComment {
- const MAX_MESSAGE_LENGTH = 1000;
+ public const MAX_MESSAGE_LENGTH = 1000;
/**
* returns the ID of the comment
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index bb3a6fe255c..c49426422e3 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -48,7 +48,7 @@ interface ICommentsManager {
*
* User interfaces shall show "Deleted user" as display name, if needed.
*/
- const DELETED_USER = 'deleted_users';
+ public const DELETED_USER = 'deleted_users';
/**
* returns a comment instance
diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php
index 0c3fa25f54f..78f7ae55814 100644
--- a/lib/public/Console/ConsoleEvent.php
+++ b/lib/public/Console/ConsoleEvent.php
@@ -32,7 +32,7 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class ConsoleEvent extends Event {
- const EVENT_RUN = 'OC\Console\Application::run';
+ public const EVENT_RUN = 'OC\Console\Application::run';
/** @var string */
protected $event;
diff --git a/lib/public/Constants.php b/lib/public/Constants.php
index 7c23745b935..b7165768733 100644
--- a/lib/public/Constants.php
+++ b/lib/public/Constants.php
@@ -40,16 +40,16 @@ class Constants {
* CRUDS permissions.
* @since 8.0.0
*/
- const PERMISSION_CREATE = 4;
- const PERMISSION_READ = 1;
- const PERMISSION_UPDATE = 2;
- const PERMISSION_DELETE = 8;
- const PERMISSION_SHARE = 16;
- const PERMISSION_ALL = 31;
+ public const PERMISSION_CREATE = 4;
+ public const PERMISSION_READ = 1;
+ public const PERMISSION_UPDATE = 2;
+ public const PERMISSION_DELETE = 8;
+ public const PERMISSION_SHARE = 16;
+ public const PERMISSION_ALL = 31;
/**
* @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no
* longer support windows as server platform.
*/
- const FILENAME_INVALID_CHARS = "\\/";
+ public const FILENAME_INVALID_CHARS = "\\/";
}
diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
index 5f17585a131..9501aabe53a 100644
--- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
@@ -35,27 +35,27 @@ interface IExpressionBuilder {
/**
* @since 9.0.0
*/
- const EQ = ExpressionBuilder::EQ;
+ public const EQ = ExpressionBuilder::EQ;
/**
* @since 9.0.0
*/
- const NEQ = ExpressionBuilder::NEQ;
+ public const NEQ = ExpressionBuilder::NEQ;
/**
* @since 9.0.0
*/
- const LT = ExpressionBuilder::LT;
+ public const LT = ExpressionBuilder::LT;
/**
* @since 9.0.0
*/
- const LTE = ExpressionBuilder::LTE;
+ public const LTE = ExpressionBuilder::LTE;
/**
* @since 9.0.0
*/
- const GT = ExpressionBuilder::GT;
+ public const GT = ExpressionBuilder::GT;
/**
* @since 9.0.0
*/
- const GTE = ExpressionBuilder::GTE;
+ public const GTE = ExpressionBuilder::GTE;
/**
* Creates a conjunction of the given boolean expressions.
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index d65872388f9..bb0ed6b205c 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -37,36 +37,36 @@ interface IQueryBuilder {
/**
* @since 9.0.0
*/
- const PARAM_NULL = \PDO::PARAM_NULL;
+ public const PARAM_NULL = \PDO::PARAM_NULL;
/**
* @since 9.0.0
*/
- const PARAM_BOOL = \PDO::PARAM_BOOL;
+ public const PARAM_BOOL = \PDO::PARAM_BOOL;
/**
* @since 9.0.0
*/
- const PARAM_INT = \PDO::PARAM_INT;
+ public const PARAM_INT = \PDO::PARAM_INT;
/**
* @since 9.0.0
*/
- const PARAM_STR = \PDO::PARAM_STR;
+ public const PARAM_STR = \PDO::PARAM_STR;
/**
* @since 9.0.0
*/
- const PARAM_LOB = \PDO::PARAM_LOB;
+ public const PARAM_LOB = \PDO::PARAM_LOB;
/**
* @since 9.0.0
*/
- const PARAM_DATE = 'datetime';
+ public const PARAM_DATE = 'datetime';
/**
* @since 9.0.0
*/
- const PARAM_INT_ARRAY = Connection::PARAM_INT_ARRAY;
+ public const PARAM_INT_ARRAY = Connection::PARAM_INT_ARRAY;
/**
* @since 9.0.0
*/
- const PARAM_STR_ARRAY = Connection::PARAM_STR_ARRAY;
+ public const PARAM_STR_ARRAY = Connection::PARAM_STR_ARRAY;
/**
diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php
index 27daa76cbdf..f3586b46faf 100644
--- a/lib/public/Dashboard/Model/WidgetSetting.php
+++ b/lib/public/Dashboard/Model/WidgetSetting.php
@@ -48,8 +48,8 @@ use JsonSerializable;
* @package OCP\Dashboard\Model
*/
final class WidgetSetting implements JsonSerializable {
- const TYPE_INPUT = 'input';
- const TYPE_CHECKBOX = 'checkbox';
+ public const TYPE_INPUT = 'input';
+ public const TYPE_CHECKBOX = 'checkbox';
/** @var string */
diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php
index 8a502b09e58..5440b0cc93a 100644
--- a/lib/public/Dashboard/Model/WidgetSetup.php
+++ b/lib/public/Dashboard/Model/WidgetSetup.php
@@ -41,9 +41,9 @@ use JsonSerializable;
* @package OCP\Dashboard\Model
*/
final class WidgetSetup implements JsonSerializable {
- const SIZE_TYPE_MIN = 'min';
- const SIZE_TYPE_MAX = 'max';
- const SIZE_TYPE_DEFAULT = 'default';
+ public const SIZE_TYPE_MIN = 'min';
+ public const SIZE_TYPE_MAX = 'max';
+ public const SIZE_TYPE_DEFAULT = 'default';
/** @var array */
diff --git a/lib/public/Files.php b/lib/public/Files.php
index a1ff8a6d5a9..33bd3296193 100644
--- a/lib/public/Files.php
+++ b/lib/public/Files.php
@@ -54,7 +54,7 @@ class Files {
* @since 5.0.0
* @deprecated 14.0.0
*/
- static public function rmdirr($dir) {
+ public static function rmdirr($dir) {
return \OC_Helper::rmdirr($dir);
}
@@ -66,7 +66,7 @@ class Files {
* @since 5.0.0
* @deprecated 14.0.0
*/
- static public function getMimeType($path) {
+ public static function getMimeType($path) {
return \OC::$server->getMimeTypeDetector()->detect($path);
}
@@ -77,7 +77,7 @@ class Files {
* @since 6.0.0
* @deprecated 14.0.0
*/
- static public function searchByMime($mimetype) {
+ public static function searchByMime($mimetype) {
return \OC\Files\Filesystem::searchByMime($mimetype);
}
diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php
index d1388f02b1d..643a2bad628 100644
--- a/lib/public/Files/Cache/ICache.php
+++ b/lib/public/Files/Cache/ICache.php
@@ -37,10 +37,10 @@ use OCP\Files\Search\ISearchQuery;
* @since 9.0.0
*/
interface ICache {
- const NOT_FOUND = 0;
- const PARTIAL = 1; //only partial data available, file not cached in the database
- const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
- const COMPLETE = 3;
+ public const NOT_FOUND = 0;
+ public const PARTIAL = 1; //only partial data available, file not cached in the database
+ public const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
+ public const COMPLETE = 3;
/**
* Get the numeric storage id for this cache's storage
diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php
index 369c8b69fc1..c9766620885 100644
--- a/lib/public/Files/Cache/ICacheEntry.php
+++ b/lib/public/Files/Cache/ICacheEntry.php
@@ -28,7 +28,7 @@ namespace OCP\Files\Cache;
* @since 9.0.0
*/
interface ICacheEntry {
- const DIRECTORY_MIMETYPE = 'httpd/unix-directory';
+ public const DIRECTORY_MIMETYPE = 'httpd/unix-directory';
/**
* Get the numeric id of a file
diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php
index e12561eb0c5..c15d42315bf 100644
--- a/lib/public/Files/Cache/IScanner.php
+++ b/lib/public/Files/Cache/IScanner.php
@@ -28,13 +28,13 @@ namespace OCP\Files\Cache;
* @since 9.0.0
*/
interface IScanner {
- const SCAN_RECURSIVE_INCOMPLETE = 2; // only recursive into not fully scanned folders
- const SCAN_RECURSIVE = true;
- const SCAN_SHALLOW = false;
+ public const SCAN_RECURSIVE_INCOMPLETE = 2; // only recursive into not fully scanned folders
+ public const SCAN_RECURSIVE = true;
+ public const SCAN_SHALLOW = false;
- const REUSE_NONE = 0;
- const REUSE_ETAG = 1;
- const REUSE_SIZE = 2;
+ public const REUSE_NONE = 0;
+ public const REUSE_ETAG = 1;
+ public const REUSE_SIZE = 2;
/**
* scan a single file and store it in the cache
diff --git a/lib/public/Files/Cache/IWatcher.php b/lib/public/Files/Cache/IWatcher.php
index 0c8065828e7..e279c8b07e0 100644
--- a/lib/public/Files/Cache/IWatcher.php
+++ b/lib/public/Files/Cache/IWatcher.php
@@ -28,9 +28,9 @@ namespace OCP\Files\Cache;
* @since 9.0.0
*/
interface IWatcher {
- const CHECK_NEVER = 0; // never check the underlying filesystem for updates
- const CHECK_ONCE = 1; // check the underlying filesystem for updates once every request for each file
- const CHECK_ALWAYS = 2; // always check the underlying filesystem for updates
+ public const CHECK_NEVER = 0; // never check the underlying filesystem for updates
+ public const CHECK_ONCE = 1; // check the underlying filesystem for updates once every request for each file
+ public const CHECK_ALWAYS = 2; // always check the underlying filesystem for updates
/**
* @param int $policy either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index f7a36e0542d..f8b0623c3e4 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -38,38 +38,38 @@ interface FileInfo {
/**
* @since 7.0.0
*/
- const TYPE_FILE = 'file';
+ public const TYPE_FILE = 'file';
/**
* @since 7.0.0
*/
- const TYPE_FOLDER = 'dir';
+ public const TYPE_FOLDER = 'dir';
/**
* @const \OCP\Files\FileInfo::SPACE_NOT_COMPUTED Return value for a not computed space value
* @since 8.0.0
*/
- const SPACE_NOT_COMPUTED = -1;
+ public const SPACE_NOT_COMPUTED = -1;
/**
* @const \OCP\Files\FileInfo::SPACE_UNKNOWN Return value for unknown space value
* @since 8.0.0
*/
- const SPACE_UNKNOWN = -2;
+ public const SPACE_UNKNOWN = -2;
/**
* @const \OCP\Files\FileInfo::SPACE_UNLIMITED Return value for unlimited space
* @since 8.0.0
*/
- const SPACE_UNLIMITED = -3;
+ public const SPACE_UNLIMITED = -3;
/**
* @since 9.1.0
*/
- const MIMETYPE_FOLDER = 'httpd/unix-directory';
+ public const MIMETYPE_FOLDER = 'httpd/unix-directory';
/**
* @const \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX Return regular expression to test filenames against (blacklisting)
* @since 12.0.0
*/
- const BLACKLIST_FILES_REGEX = '\.(part|filepart)$';
+ public const BLACKLIST_FILES_REGEX = '\.(part|filepart)$';
/**
* Get the Etag of the file or folder
diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php
index 762030c738a..b018be77932 100644
--- a/lib/public/Files/Notify/IChange.php
+++ b/lib/public/Files/Notify/IChange.php
@@ -29,10 +29,10 @@ namespace OCP\Files\Notify;
* @since 12.0.0
*/
interface IChange {
- const ADDED = 1;
- const REMOVED = 2;
- const MODIFIED = 3;
- const RENAMED = 4;
+ public const ADDED = 1;
+ public const REMOVED = 2;
+ public const MODIFIED = 3;
+ public const RENAMED = 4;
/**
* Get the type of the change
diff --git a/lib/public/Files/Search/ISearchBinaryOperator.php b/lib/public/Files/Search/ISearchBinaryOperator.php
index a089323c9fc..554108aadf2 100644
--- a/lib/public/Files/Search/ISearchBinaryOperator.php
+++ b/lib/public/Files/Search/ISearchBinaryOperator.php
@@ -27,9 +27,9 @@ namespace OCP\Files\Search;
* @since 12.0.0
*/
interface ISearchBinaryOperator extends ISearchOperator {
- const OPERATOR_AND = 'and';
- const OPERATOR_OR = 'or';
- const OPERATOR_NOT = 'not';
+ public const OPERATOR_AND = 'and';
+ public const OPERATOR_OR = 'or';
+ public const OPERATOR_NOT = 'not';
/**
* The type of binary operator
diff --git a/lib/public/Files/Search/ISearchComparison.php b/lib/public/Files/Search/ISearchComparison.php
index 6cfbb29ee54..e2e0a705183 100644
--- a/lib/public/Files/Search/ISearchComparison.php
+++ b/lib/public/Files/Search/ISearchComparison.php
@@ -27,12 +27,12 @@ namespace OCP\Files\Search;
* @since 12.0.0
*/
interface ISearchComparison extends ISearchOperator {
- const COMPARE_EQUAL = 'eq';
- const COMPARE_GREATER_THAN = 'gt';
- const COMPARE_GREATER_THAN_EQUAL = 'gte';
- const COMPARE_LESS_THAN = 'lt';
- const COMPARE_LESS_THAN_EQUAL = 'lte';
- const COMPARE_LIKE = 'like';
+ public const COMPARE_EQUAL = 'eq';
+ public const COMPARE_GREATER_THAN = 'gt';
+ public const COMPARE_GREATER_THAN_EQUAL = 'gte';
+ public const COMPARE_LESS_THAN = 'lt';
+ public const COMPARE_LESS_THAN_EQUAL = 'lte';
+ public const COMPARE_LIKE = 'like';
/**
* Get the type of comparison, one of the ISearchComparison::COMPARE_* constants
diff --git a/lib/public/Files/Search/ISearchOrder.php b/lib/public/Files/Search/ISearchOrder.php
index 817c7e3b5b4..fdcd53447f5 100644
--- a/lib/public/Files/Search/ISearchOrder.php
+++ b/lib/public/Files/Search/ISearchOrder.php
@@ -27,8 +27,8 @@ namespace OCP\Files\Search;
* @since 12.0.0
*/
interface ISearchOrder {
- const DIRECTION_ASCENDING = 'asc';
- const DIRECTION_DESCENDING = 'desc';
+ public const DIRECTION_ASCENDING = 'asc';
+ public const DIRECTION_DESCENDING = 'desc';
/**
* The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING
diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php
index 60893c2f636..f460201becb 100644
--- a/lib/public/Files/Storage/INotifyStorage.php
+++ b/lib/public/Files/Storage/INotifyStorage.php
@@ -31,10 +31,10 @@ use OCP\Files\Notify\INotifyHandler;
* @since 9.1.0
*/
interface INotifyStorage {
- const NOTIFY_ADDED = 1;
- const NOTIFY_REMOVED = 2;
- const NOTIFY_MODIFIED = 3;
- const NOTIFY_RENAMED = 4;
+ public const NOTIFY_ADDED = 1;
+ public const NOTIFY_REMOVED = 2;
+ public const NOTIFY_MODIFIED = 3;
+ public const NOTIFY_RENAMED = 4;
/**
* Start listening for update notifications
diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php
index 1a0465bda13..c0592cfc5af 100644
--- a/lib/public/Files/StorageNotAvailableException.php
+++ b/lib/public/Files/StorageNotAvailableException.php
@@ -44,13 +44,13 @@ use OC\HintException;
* @since 6.0.0 - since 8.2.1 based on HintException
*/
class StorageNotAvailableException extends HintException {
- const STATUS_SUCCESS = 0;
- const STATUS_ERROR = 1;
- const STATUS_INDETERMINATE = 2;
- const STATUS_INCOMPLETE_CONF = 3;
- const STATUS_UNAUTHORIZED = 4;
- const STATUS_TIMEOUT = 5;
- const STATUS_NETWORK_ERROR = 6;
+ public const STATUS_SUCCESS = 0;
+ public const STATUS_ERROR = 1;
+ public const STATUS_INDETERMINATE = 2;
+ public const STATUS_INCOMPLETE_CONF = 3;
+ public const STATUS_UNAUTHORIZED = 4;
+ public const STATUS_TIMEOUT = 5;
+ public const STATUS_NETWORK_ERROR = 6;
/**
* StorageNotAvailableException constructor.
diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php
index fb279336c55..8272d7e78eb 100644
--- a/lib/public/FullTextSearch/Model/IIndex.php
+++ b/lib/public/FullTextSearch/Model/IIndex.php
@@ -45,25 +45,25 @@ namespace OCP\FullTextSearch\Model;
* @package OCP\FullTextSearch\Model
*/
interface IIndex {
- const INDEX_OK = 1;
- const INDEX_IGNORE = 2;
-
- const INDEX_META = 4;
- const INDEX_CONTENT = 8;
- const INDEX_PARTS = 16;
- const INDEX_FULL = 28;
- const INDEX_REMOVE = 32;
- const INDEX_DONE = 64;
- const INDEX_FAILED = 128;
-
- const ERROR_FAILED = 1;
- const ERROR_FAILED2 = 2;
- const ERROR_FAILED3 = 4;
-
- const ERROR_SEV_1 = 1;
- const ERROR_SEV_2 = 2;
- const ERROR_SEV_3 = 3;
- const ERROR_SEV_4 = 4;
+ public const INDEX_OK = 1;
+ public const INDEX_IGNORE = 2;
+
+ public const INDEX_META = 4;
+ public const INDEX_CONTENT = 8;
+ public const INDEX_PARTS = 16;
+ public const INDEX_FULL = 28;
+ public const INDEX_REMOVE = 32;
+ public const INDEX_DONE = 64;
+ public const INDEX_FAILED = 128;
+
+ public const ERROR_FAILED = 1;
+ public const ERROR_FAILED2 = 2;
+ public const ERROR_FAILED3 = 4;
+
+ public const ERROR_SEV_1 = 1;
+ public const ERROR_SEV_2 = 2;
+ public const ERROR_SEV_3 = 3;
+ public const ERROR_SEV_4 = 4;
/**
diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php
index c7af11d7472..1858e5dc97c 100644
--- a/lib/public/FullTextSearch/Model/IIndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IIndexDocument.php
@@ -43,8 +43,8 @@ namespace OCP\FullTextSearch\Model;
* @package OC\FullTextSearch\Model
*/
interface IIndexDocument {
- const NOT_ENCODED = 0;
- const ENCODED_BASE64 = 1;
+ public const NOT_ENCODED = 0;
+ public const ENCODED_BASE64 = 1;
diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php
index 230e9932c46..3692400d1dc 100644
--- a/lib/public/FullTextSearch/Model/IRunner.php
+++ b/lib/public/FullTextSearch/Model/IRunner.php
@@ -41,9 +41,9 @@ namespace OCP\FullTextSearch\Model;
* @package OCP\FullTextSearch\Model
*/
interface IRunner {
- const RESULT_TYPE_SUCCESS = 1;
- const RESULT_TYPE_WARNING = 4;
- const RESULT_TYPE_FAIL = 9;
+ public const RESULT_TYPE_SUCCESS = 1;
+ public const RESULT_TYPE_WARNING = 4;
+ public const RESULT_TYPE_FAIL = 9;
/**
diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php
index 7d57f9eb3f9..8e902296ff6 100644
--- a/lib/public/FullTextSearch/Model/ISearchOption.php
+++ b/lib/public/FullTextSearch/Model/ISearchOption.php
@@ -39,17 +39,17 @@ interface ISearchOption {
/**
* @since 16.0.0
*/
- const CHECKBOX = 'checkbox';
+ public const CHECKBOX = 'checkbox';
/**
* @since 16.0.0
*/
- const INPUT = 'input';
+ public const INPUT = 'input';
/**
* @since 16.0.0
*/
- const INPUT_SMALL = 'small';
+ public const INPUT_SMALL = 'small';
/**
diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
index f9ddde86a0d..e0868c260c2 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
@@ -39,17 +39,17 @@ namespace OCP\FullTextSearch\Model;
* @package OCP\FullTextSearch\Model
*/
interface ISearchRequestSimpleQuery {
- const COMPARE_TYPE_TEXT = 1;
- const COMPARE_TYPE_KEYWORD = 2;
- const COMPARE_TYPE_INT_EQ = 3;
- const COMPARE_TYPE_INT_GTE = 4;
- const COMPARE_TYPE_INT_GT = 5;
- const COMPARE_TYPE_INT_LTE = 6;
- const COMPARE_TYPE_INT_LT = 7;
- const COMPARE_TYPE_BOOL = 8;
- const COMPARE_TYPE_ARRAY = 9;
- const COMPARE_TYPE_REGEX = 10;
- const COMPARE_TYPE_WILDCARD = 11;
+ public const COMPARE_TYPE_TEXT = 1;
+ public const COMPARE_TYPE_KEYWORD = 2;
+ public const COMPARE_TYPE_INT_EQ = 3;
+ public const COMPARE_TYPE_INT_GTE = 4;
+ public const COMPARE_TYPE_INT_GT = 5;
+ public const COMPARE_TYPE_INT_LTE = 6;
+ public const COMPARE_TYPE_INT_LT = 7;
+ public const COMPARE_TYPE_BOOL = 8;
+ public const COMPARE_TYPE_ARRAY = 9;
+ public const COMPARE_TYPE_REGEX = 10;
+ public const COMPARE_TYPE_WILDCARD = 11;
/**
diff --git a/lib/public/GroupInterface.php b/lib/public/GroupInterface.php
index 8960a791b83..c01b53fcd97 100644
--- a/lib/public/GroupInterface.php
+++ b/lib/public/GroupInterface.php
@@ -47,18 +47,18 @@ interface GroupInterface {
/**
* actions that user backends can define
*/
- const CREATE_GROUP = 0x00000001;
- const DELETE_GROUP = 0x00000010;
- const ADD_TO_GROUP = 0x00000100;
- const REMOVE_FROM_GOUP = 0x00001000; // oops
- const REMOVE_FROM_GROUP = 0x00001000;
+ public const CREATE_GROUP = 0x00000001;
+ public const DELETE_GROUP = 0x00000010;
+ public const ADD_TO_GROUP = 0x00000100;
+ public const REMOVE_FROM_GOUP = 0x00001000; // oops
+ public const REMOVE_FROM_GROUP = 0x00001000;
//OBSOLETE const GET_DISPLAYNAME = 0x00010000;
- const COUNT_USERS = 0x00100000;
- const GROUP_DETAILS = 0x01000000;
+ public const COUNT_USERS = 0x00100000;
+ public const GROUP_DETAILS = 0x01000000;
/**
* @since 13.0.0
*/
- const IS_ADMIN = 0x10000000;
+ public const IS_ADMIN = 0x10000000;
/**
* Check if backend implements actions
diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php
index a46dff322c5..780d32d22dd 100644
--- a/lib/public/IConfig.php
+++ b/lib/public/IConfig.php
@@ -46,7 +46,7 @@ interface IConfig {
/**
* @since 8.2.0
*/
- const SENSITIVE_VALUE = '***REMOVED SENSITIVE VALUE***';
+ public const SENSITIVE_VALUE = '***REMOVED SENSITIVE VALUE***';
/**
* Sets and deletes system wide values
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php
index a8822ad7e5c..5e5543f10cf 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -49,10 +49,10 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
* @since 6.0.0
*/
interface IDBConnection {
- const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
- const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
- const ADD_MISSING_COLUMNS_EVENT = self::class . '::ADD_MISSING_COLUMNS';
- const CHECK_MISSING_COLUMNS_EVENT = self::class . '::CHECK_MISSING_COLUMNS';
+ public const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
+ public const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
+ public const ADD_MISSING_COLUMNS_EVENT = self::class . '::ADD_MISSING_COLUMNS';
+ public const CHECK_MISSING_COLUMNS_EVENT = self::class . '::CHECK_MISSING_COLUMNS';
/**
* Gets the QueryBuilder for the connection.
diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php
index 878f795e113..d7f326f1f6d 100644
--- a/lib/public/ILogger.php
+++ b/lib/public/ILogger.php
@@ -43,23 +43,23 @@ interface ILogger {
/**
* @since 14.0.0
*/
- const DEBUG=0;
+ public const DEBUG=0;
/**
* @since 14.0.0
*/
- const INFO=1;
+ public const INFO=1;
/**
* @since 14.0.0
*/
- const WARN=2;
+ public const WARN=2;
/**
* @since 14.0.0
*/
- const ERROR=3;
+ public const ERROR=3;
/**
* @since 14.0.0
*/
- const FATAL=4;
+ public const FATAL=4;
/**
* System is unusable.
diff --git a/lib/public/INavigationManager.php b/lib/public/INavigationManager.php
index 1e8e461341b..0a5e1890f42 100644
--- a/lib/public/INavigationManager.php
+++ b/lib/public/INavigationManager.php
@@ -47,19 +47,19 @@ interface INavigationManager {
* Navigation entries of the app navigation
* @since 16.0.0
*/
- const TYPE_APPS = 'link';
+ public const TYPE_APPS = 'link';
/**
* Navigation entries of the settings navigation
* @since 16.0.0
*/
- const TYPE_SETTINGS = 'settings';
+ public const TYPE_SETTINGS = 'settings';
/**
* Navigation entries for public page footer navigation
* @since 16.0.0
*/
- const TYPE_GUEST = 'guest';
+ public const TYPE_GUEST = 'guest';
/**
* Creates a new navigation entry
diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php
index 164cbbac2bf..602a54bea2e 100644
--- a/lib/public/IPreview.php
+++ b/lib/public/IPreview.php
@@ -48,10 +48,10 @@ interface IPreview {
/**
* @since 9.2.0
*/
- const EVENT = self::class . ':' . 'PreviewRequested';
+ public const EVENT = self::class . ':' . 'PreviewRequested';
- const MODE_FILL = 'fill';
- const MODE_COVER = 'cover';
+ public const MODE_FILL = 'fill';
+ public const MODE_COVER = 'cover';
/**
* In order to improve lazy loading a closure can be registered which will be
diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php
index 05ba1055be3..bb646c078aa 100644
--- a/lib/public/IRequest.php
+++ b/lib/public/IRequest.php
@@ -73,37 +73,37 @@ interface IRequest {
/**
* @since 9.1.0
*/
- const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) (ownCloud|Nextcloud)\-android.*$/';
+ public const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) (ownCloud|Nextcloud)\-android.*$/';
/**
* @since 13.0.0
*/
- const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v.*$/';
+ public const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v.*$/';
/**
* @since 9.1.0
*/
- const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
+ public const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
/**
* @since 9.1.0
*/
- const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
+ public const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
/**
* @since 13.0.0
*/
- const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v.*$/';
+ public const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v.*$/';
/**
* @since 13.0.1
*/
- const USER_AGENT_OUTLOOK_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Outlook v.*$/';
+ public const USER_AGENT_OUTLOOK_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Outlook v.*$/';
/**
* @since 13.0.1
*/
- const USER_AGENT_THUNDERBIRD_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Thunderbird v.*$/';
+ public const USER_AGENT_THUNDERBIRD_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Thunderbird v.*$/';
/**
* @param string $name
diff --git a/lib/public/Lock/ILockingProvider.php b/lib/public/Lock/ILockingProvider.php
index 4403b091993..373a68334a1 100644
--- a/lib/public/Lock/ILockingProvider.php
+++ b/lib/public/Lock/ILockingProvider.php
@@ -37,11 +37,11 @@ interface ILockingProvider {
/**
* @since 8.1.0
*/
- const LOCK_SHARED = 1;
+ public const LOCK_SHARED = 1;
/**
* @since 8.1.0
*/
- const LOCK_EXCLUSIVE = 2;
+ public const LOCK_EXCLUSIVE = 2;
/**
* @param string $path
diff --git a/lib/public/Search/PagedProvider.php b/lib/public/Search/PagedProvider.php
index 17e8aef337c..ee8d1b12508 100644
--- a/lib/public/Search/PagedProvider.php
+++ b/lib/public/Search/PagedProvider.php
@@ -36,7 +36,7 @@ abstract class PagedProvider extends Provider {
* show all results
* @since 8.0.0
*/
- const SIZE_ALL = 0;
+ public const SIZE_ALL = 0;
/**
* Constructor
diff --git a/lib/public/Search/Provider.php b/lib/public/Search/Provider.php
index bc6f76a11c2..18594eefb8f 100644
--- a/lib/public/Search/Provider.php
+++ b/lib/public/Search/Provider.php
@@ -36,7 +36,7 @@ abstract class Provider {
/**
* @since 8.0.0
*/
- const OPTION_APPS = 'apps';
+ public const OPTION_APPS = 'apps';
/**
* List of options
diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php
index 956026bc9e3..2268e91289a 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -44,17 +44,17 @@ interface ISecureRandom {
/**
* Flags for characters that can be used for <code>generate($length, $characters)</code>
*/
- const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
- const CHAR_DIGITS = '0123456789';
- const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~';
+ public const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ public const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
+ public const CHAR_DIGITS = '0123456789';
+ public const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~';
/**
* Characters that can be used for <code>generate($length, $characters)</code>, to
* generate human readable random strings. Lower- and upper-case characters and digits
* are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on.
*/
- const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789';
+ public const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789';
/**
* Generate a random string of specified length.
diff --git a/lib/public/Settings/IManager.php b/lib/public/Settings/IManager.php
index 5c7d0712080..c03c3d588b8 100644
--- a/lib/public/Settings/IManager.php
+++ b/lib/public/Settings/IManager.php
@@ -33,22 +33,22 @@ interface IManager {
/**
* @since 9.1.0
*/
- const KEY_ADMIN_SETTINGS = 'admin';
+ public const KEY_ADMIN_SETTINGS = 'admin';
/**
* @since 9.1.0
*/
- const KEY_ADMIN_SECTION = 'admin-section';
+ public const KEY_ADMIN_SECTION = 'admin-section';
/**
* @since 13.0.0
*/
- const KEY_PERSONAL_SETTINGS = 'personal';
+ public const KEY_PERSONAL_SETTINGS = 'personal';
/**
* @since 13.0.0
*/
- const KEY_PERSONAL_SECTION = 'personal-section';
+ public const KEY_PERSONAL_SECTION = 'personal-section';
/**
* @param string $type 'admin' or 'personal'
diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php
index 290d4f4c129..816a7585dfc 100644
--- a/lib/public/SystemTag/ManagerEvent.php
+++ b/lib/public/SystemTag/ManagerEvent.php
@@ -37,9 +37,9 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class ManagerEvent extends Event {
- const EVENT_CREATE = 'OCP\SystemTag\ISystemTagManager::createTag';
- const EVENT_UPDATE = 'OCP\SystemTag\ISystemTagManager::updateTag';
- const EVENT_DELETE = 'OCP\SystemTag\ISystemTagManager::deleteTag';
+ public const EVENT_CREATE = 'OCP\SystemTag\ISystemTagManager::createTag';
+ public const EVENT_UPDATE = 'OCP\SystemTag\ISystemTagManager::updateTag';
+ public const EVENT_DELETE = 'OCP\SystemTag\ISystemTagManager::deleteTag';
/** @var string */
protected $event;
diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php
index 38268fed1da..a8f04742e90 100644
--- a/lib/public/SystemTag/MapperEvent.php
+++ b/lib/public/SystemTag/MapperEvent.php
@@ -36,8 +36,8 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class MapperEvent extends Event {
- const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
- const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
+ public const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
+ public const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
/** @var string */
protected $event;
diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php
index 011f7d09fc0..ae49323507b 100644
--- a/lib/public/SystemTag/SystemTagsEntityEvent.php
+++ b/lib/public/SystemTag/SystemTagsEntityEvent.php
@@ -36,7 +36,7 @@ use OCP\EventDispatcher\Event;
* @since 9.1.0
*/
class SystemTagsEntityEvent extends Event {
- const EVENT_ENTITY = 'OCP\SystemTag\ISystemTagManager::registerEntity';
+ public const EVENT_ENTITY = 'OCP\SystemTag\ISystemTagManager::registerEntity';
/** @var string */
protected $event;
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 46d818fc497..72f061afb45 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -60,23 +60,23 @@ class Util {
/**
* @deprecated 14.0.0 use \OCP\ILogger::DEBUG
*/
- const DEBUG=0;
+ public const DEBUG=0;
/**
* @deprecated 14.0.0 use \OCP\ILogger::INFO
*/
- const INFO=1;
+ public const INFO=1;
/**
* @deprecated 14.0.0 use \OCP\ILogger::WARN
*/
- const WARN=2;
+ public const WARN=2;
/**
* @deprecated 14.0.0 use \OCP\ILogger::ERROR
*/
- const ERROR=3;
+ public const ERROR=3;
/**
* @deprecated 14.0.0 use \OCP\ILogger::FATAL
*/
- const FATAL=4;
+ public const FATAL=4;
/** \OCP\Share\IManager */
private static $shareManager;
@@ -336,7 +336,7 @@ class Util {
* TODO: write example
* @since 4.0.0
*/
- static public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
+ public static function connectHook($signalClass, $signalName, $slotClass, $slotName) {
return \OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName);
}
@@ -350,7 +350,7 @@ class Util {
* TODO: write example
* @since 4.0.0
*/
- static public function emitHook($signalclass, $signalname, $params = []) {
+ public static function emitHook($signalclass, $signalname, $params = []) {
return \OC_Hook::emit($signalclass, $signalname, $params);
}
diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php
index b9ce157c222..6537666ce08 100644
--- a/lib/public/WorkflowEngine/IManager.php
+++ b/lib/public/WorkflowEngine/IManager.php
@@ -32,15 +32,15 @@ namespace OCP\WorkflowEngine;
* @since 9.1
*/
interface IManager {
- const SCOPE_ADMIN = 0;
- const SCOPE_USER = 1;
+ public const SCOPE_ADMIN = 0;
+ public const SCOPE_USER = 1;
/**
* @depreacted Will be removed in NC19. Use the dedicated events in OCP\WorkflowEngine\Events
*/
- const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations';
- const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities';
- const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks';
+ public const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations';
+ public const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities';
+ public const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks';
/**
* Listen to `OCP\WorkflowEngine\Events\RegisterEntitiesEvent` at the