From d0248d55d356914479e670c76342b9daaa535634 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 13 Jun 2021 12:43:18 +0200 Subject: [PATCH] address Scrutinizer issues --- lib/Data/GoogleCloudStorage.php | 2 +- lib/Json.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Data/GoogleCloudStorage.php b/lib/Data/GoogleCloudStorage.php index d678db3..c7dfcb9 100644 --- a/lib/Data/GoogleCloudStorage.php +++ b/lib/Data/GoogleCloudStorage.php @@ -291,7 +291,7 @@ class GoogleCloudStorage extends AbstractData try { $o = $this->_bucket->object($key); $data = $o->downloadAsString(); - return Json::decode($data); + return (string) Json::decode($data); } catch (NotFoundException $e) { return ''; } diff --git a/lib/Json.php b/lib/Json.php index b6567ed..5f4efcf 100644 --- a/lib/Json.php +++ b/lib/Json.php @@ -44,13 +44,13 @@ class Json * @static * @param string $input * @throws Exception - * @return array + * @return mixed */ public static function decode($input) { - $array = json_decode($input, true); + $output = json_decode($input, true); self::_detectError(); - return $array; + return $output; } /**