diff options
Diffstat (limited to 'lib/Cron/Index.php')
-rw-r--r-- | lib/Cron/Index.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Cron/Index.php b/lib/Cron/Index.php index 729d54e..3614246 100644 --- a/lib/Cron/Index.php +++ b/lib/Cron/Index.php @@ -1,4 +1,6 @@ <?php +declare(strict_types=1); + /** * FullTextSearch - Full text search framework for Nextcloud @@ -25,12 +27,13 @@ * */ + namespace OCA\FullTextSearch\Cron; + use Exception; use OC\BackgroundJob\TimedJob; use OCA\FullTextSearch\AppInfo\Application; -use OCA\FullTextSearch\Exceptions\InterruptException; use OCA\FullTextSearch\Model\Runner; use OCA\FullTextSearch\Service\ConfigService; use OCA\FullTextSearch\Service\IndexService; @@ -74,7 +77,7 @@ class Index extends TimedJob { /** - * @param $argument + * @param mixed $argument * * @throws QueryException */ @@ -105,7 +108,6 @@ class Index extends TimedJob { /** * @throws Exception - * @throws InterruptException */ private function liveCycle() { @@ -139,7 +141,7 @@ class Index extends TimedJob { /** * @return bool */ - private function shouldWeGetAllIndex() { + private function shouldWeGetAllIndex(): bool { $lastErrReset = (int)$this->configService->getAppValue(ConfigService::CRON_LAST_ERR_RESET); if ($lastErrReset === 0) { @@ -161,6 +163,6 @@ class Index extends TimedJob { * */ private function setLastErrReset() { - $this->configService->setAppValue(ConfigService::CRON_LAST_ERR_RESET, time()); + $this->configService->setAppValue(ConfigService::CRON_LAST_ERR_RESET, (string) time()); } } |