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
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-09-15 15:28:04 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-09-16 17:37:21 +0300
commit47caac10f5fd547e92b2668432f76313ee2a4f1a (patch)
tree4f29b90917bd147a7570c60041f4d88cb415f830 /apps/files_trashbin
parent764726ce0128054a036f8c515cc62d3ca2e490cd (diff)
Add PHPDoc
Diffstat (limited to 'apps/files_trashbin')
-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();