From 2fe42cb1786eb5fe25a2987197265a072b9c1a20 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 17 Jun 2023 12:01:19 +0200 Subject: [PATCH] announce_settings must be static --- lib/Hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Hooks.php b/lib/Hooks.php index aa41432..35cea44 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -18,7 +18,7 @@ use OCP\Server; class Hooks { - public function announce_settings(array $settings): void { + public static function announce_settings(array $settings): void { // Nextcloud encodes this as JSON, Owncloud does not (yet) (#75) // TODO: remove this when Owncloud starts encoding oc_appconfig as JSON just like it already encodes most other properties $user = Server::get(IUserSession::class)->getUser(); @@ -59,7 +59,7 @@ class Hooks { $queryBuilder->executeStatement(); } - private function isJson(mixed $string): bool { + private static function isJson(mixed $string): bool { return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false; } }