diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-09-15 14:28:04 +0200 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-09-16 17:37:21 +0300 |
commit | 47caac10f5fd547e92b2668432f76313ee2a4f1a (patch) | |
tree | 4f29b90917bd147a7570c60041f4d88cb415f830 /apps | |
parent | 764726ce0128054a036f8c515cc62d3ca2e490cd (diff) | |
download | nextcloud-server-47caac10f5fd547e92b2668432f76313ee2a4f1a.tar.gz nextcloud-server-47caac10f5fd547e92b2668432f76313ee2a4f1a.zip |
Add PHPDoc
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_trashbin/lib/backgroundjob/expiretrash.php | 13 | ||||
-rw-r--r-- | apps/files_trashbin/lib/expiration.php | 5 |
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(); |