summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_trashbin/lib/backgroundjob/expiretrash.php13
-rw-r--r--apps/files_trashbin/lib/expiration.php5
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/backgroundjob/expiretrash.php b/apps/files_trashbin/lib/backgroundjob/expiretrash.php
index 07bcce0659b..a222767669a 100644
--- a/apps/files_trashbin/lib/backgroundjob/expiretrash.php
+++ b/apps/files_trashbin/lib/backgroundjob/expiretrash.php
@@ -49,7 +49,14 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob {
const USERS_PER_SESSION = 1000;
- public function __construct(IConfig $config = null, IUserManager $userManager = null, Expiration $expiration = null) {
+ /**
+ * @param IConfig|null $config
+ * @param IUserManager|null $userManager
+ * @param Expiration|null $expiration
+ */
+ public function __construct(IConfig $config = null,
+ IUserManager $userManager = null,
+ Expiration $expiration = null) {
// Run once per 30 minutes
$this->setInterval(60 * 30);
@@ -69,6 +76,10 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob {
$this->expiration = $application->getContainer()->query('Expiration');
}
+ /**
+ * @param $argument
+ * @throws \Exception
+ */
protected function run($argument) {
$maxAge = $this->expiration->getMaxAgeAsTimestamp();
if (!$maxAge) {
diff --git a/apps/files_trashbin/lib/expiration.php b/apps/files_trashbin/lib/expiration.php
index c8a6abb627b..5069521aab3 100644
--- a/apps/files_trashbin/lib/expiration.php
+++ b/apps/files_trashbin/lib/expiration.php
@@ -105,7 +105,10 @@ class Expiration {
return $isOlderThanMax || $isMinReached;
}
- public function getMaxAgeAsTimestamp(){
+ /**
+ * @return bool|int
+ */
+ public function getMaxAgeAsTimestamp() {
$maxAge = false;
if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) {
$time = $this->timeFactory->getTime();