diff options
Diffstat (limited to 'lib/private')
25 files changed, 103 insertions, 103 deletions
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/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/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..f6e7c12d02d 100644 --- a/lib/private/Archive/TAR.php +++ b/lib/private/Archive/TAR.php @@ -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/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/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/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/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 248b6d2d854..1e9902f8871 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -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/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/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/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/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/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/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/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_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 4e75c9da747..980eb609259 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -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_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. |