From 1895b865ca41f15b0ac58d047a91195fd34d0063 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 12 Mar 2019 12:22:18 +0100 Subject: [PATCH 1/2] Require Nextcloud 16 Signed-off-by: Christoph Wurst --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 0df513a0..fac6f930 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -15,7 +15,7 @@ office - + \OCA\Recommendations\Command\GetRecommendations From e1d72c6371b596f61987bbbf8cbbbaae3dcae790 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 12 Mar 2019 12:26:49 +0100 Subject: [PATCH 2/2] Use php7.1+ features Signed-off-by: Christoph Wurst --- appinfo/info.xml | 2 +- lib/AppInfo/Application.php | 2 +- lib/Service/IRecommendation.php | 2 +- lib/Service/RecommendationService.php | 2 +- lib/Service/RecommendedFile.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index fac6f930..aa1f0c2b 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ Recommendations office - + diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 5abe0aad..d5dedbb0 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -30,7 +30,7 @@ class Application extends App { - const APP_ID = 'recommendations'; + public const APP_ID = 'recommendations'; public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); diff --git a/lib/Service/IRecommendation.php b/lib/Service/IRecommendation.php index 036bc6ff..3b61f7ff 100644 --- a/lib/Service/IRecommendation.php +++ b/lib/Service/IRecommendation.php @@ -36,7 +36,7 @@ public function getTimestamp(): int; public function getNode(): Node; - public function hasPreview(); + public function hasPreview(): bool; public function setHasPreview(bool $state); diff --git a/lib/Service/RecommendationService.php b/lib/Service/RecommendationService.php index 1569f01b..d830b8b1 100644 --- a/lib/Service/RecommendationService.php +++ b/lib/Service/RecommendationService.php @@ -34,7 +34,7 @@ class RecommendationService { - const MAX_RECOMMENDATIONS = 5; + private const MAX_RECOMMENDATIONS = 5; /** @var IRecommendationSource */ private $sources; diff --git a/lib/Service/RecommendedFile.php b/lib/Service/RecommendedFile.php index 60767107..cb20b3d1 100644 --- a/lib/Service/RecommendedFile.php +++ b/lib/Service/RecommendedFile.php @@ -75,7 +75,7 @@ public function getReason(): string { return $this->reason; } - public function hasPreview() { + public function hasPreview(): bool { return $this->hasPreview; }