diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 14:53:40 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 14:54:22 +0300 |
commit | afbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch) | |
tree | 7d8721cf8fc0329d6b750db63798de67a162b090 /apps/files_versions/lib | |
parent | 19e97e86c69ab128191439d6a17dacb5a630cf98 (diff) |
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r-- | apps/files_versions/lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/BackgroundJob/ExpireVersions.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/Command/ExpireVersions.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/Expiration.php | 12 | ||||
-rw-r--r-- | apps/files_versions/lib/Hooks.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/Storage.php | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php index 32ba9d40505..040b72a8f0a 100644 --- a/apps/files_versions/lib/AppInfo/Application.php +++ b/apps/files_versions/lib/AppInfo/Application.php @@ -75,7 +75,7 @@ class Application extends App { ); }); - $container->registerService(IVersionManager::class, function(IAppContainer $c) { + $container->registerService(IVersionManager::class, function (IAppContainer $c) { return new VersionManager(); }); diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php index cb2e0abb0c4..eb4287376e9 100644 --- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php +++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php @@ -58,7 +58,7 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { return; } - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $uid = $user->getUID(); if (!$this->setupFS($uid)) { return; diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php index ba12ce2a496..d67542db259 100644 --- a/apps/files_versions/lib/Command/ExpireVersions.php +++ b/apps/files_versions/lib/Command/ExpireVersions.php @@ -91,7 +91,7 @@ class ExpireVersions extends Command { } else { $p = new ProgressBar($output); $p->start(); - $this->userManager->callForSeenUsers(function(IUser $user) use ($p) { + $this->userManager->callForSeenUsers(function (IUser $user) use ($p) { $p->advance(); $this->expireVersionsForUser($user); }); diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php index 6959de6a943..d57bc20dc81 100644 --- a/apps/files_versions/lib/Expiration.php +++ b/apps/files_versions/lib/Expiration.php @@ -47,7 +47,7 @@ class Expiration { /** @var bool */ private $canPurgeToSaveSpace; - public function __construct(IConfig $config,ITimeFactory $timeFactory){ + public function __construct(IConfig $config,ITimeFactory $timeFactory) { $this->timeFactory = $timeFactory; $this->retentionObligation = $config->getSystemValue('versions_retention_obligation', 'auto'); @@ -60,14 +60,14 @@ class Expiration { * Is versions expiration enabled * @return bool */ - public function isEnabled(){ + public function isEnabled() { return $this->retentionObligation !== 'disabled'; } /** * Is default expiration active */ - public function shouldAutoExpire(){ + public function shouldAutoExpire() { return $this->minAge === self::NO_OBLIGATION || $this->maxAge === self::NO_OBLIGATION; } @@ -78,7 +78,7 @@ class Expiration { * @param bool $quotaExceeded * @return bool */ - public function isExpired($timestamp, $quotaExceeded = false){ + public function isExpired($timestamp, $quotaExceeded = false) { // No expiration if disabled if (!$this->isEnabled()) { return false; @@ -119,7 +119,7 @@ class Expiration { * Get maximal retention obligation as a timestamp * @return int */ - public function getMaxAgeAsTimestamp(){ + public function getMaxAgeAsTimestamp() { $maxAge = false; if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) { $time = $this->timeFactory->getTime(); @@ -132,7 +132,7 @@ class Expiration { * Read versions_retention_obligation, validate it * and set private members accordingly */ - private function parseRetentionObligation(){ + private function parseRetentionObligation() { $splitValues = explode(',', $this->retentionObligation); if (!isset($splitValues[0])) { $minValue = 'auto'; diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Hooks.php index b45b082865d..179a404ed9a 100644 --- a/apps/files_versions/lib/Hooks.php +++ b/apps/files_versions/lib/Hooks.php @@ -56,7 +56,7 @@ class Hooks { /** * listen to write event. */ - public static function write_hook( $params ) { + public static function write_hook($params) { $path = $params[Filesystem::signal_param_path]; if($path !== '') { Storage::store($path); diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index b1d6c689c61..1c4e424ec78 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -497,7 +497,7 @@ class Storage { * Expire versions that older than max version retention time * @param string $uid */ - public static function expireOlderThanMaxForUser($uid){ + public static function expireOlderThanMaxForUser($uid) { $expiration = self::getExpiration(); $threshold = $expiration->getMaxAgeAsTimestamp(); $versions = self::getAllVersions($uid); @@ -848,7 +848,7 @@ class Storage { * Static workaround * @return Expiration */ - protected static function getExpiration(){ + protected static function getExpiration() { if (self::$application === null) { self::$application = \OC::$server->query(Application::class); } |