From 884e450cad507136714a53e4ab7002b96d2af907 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 18 Jun 2023 02:09:28 +0200 Subject: [PATCH] php7.4 mixed --- lib/Db/ReaderEntity.php | 2 +- lib/Hooks.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Db/ReaderEntity.php b/lib/Db/ReaderEntity.php index 66eb48a..6fa301d 100644 --- a/lib/Db/ReaderEntity.php +++ b/lib/Db/ReaderEntity.php @@ -24,7 +24,7 @@ abstract class ReaderEntity extends Entity { * * @return string|array */ - public function conditional_json_decode(string $el): mixed { + public function conditional_json_decode(string $el) { /** @var array $result */ $result = json_decode($el); if (json_last_error() === JSON_ERROR_NONE) { diff --git a/lib/Hooks.php b/lib/Hooks.php index cb3cd0a..a9a87d0 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -79,7 +79,10 @@ class Hooks { $queryBuilder->executeStatement(); } - private static function isJson(mixed $string): bool { + /** + * @param mixed $string + */ + private static function isJson($string): bool { return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE; } }