From f56df5ff82dea46d6bc21a32ccf505663903dd59 Mon Sep 17 00:00:00 2001 From: David Carr Date: Sun, 12 May 2024 08:38:50 +0100 Subject: [PATCH] removed object type hint from `isJson` function argument type in MsGraphAdmin --- src/MsGraphAdmin.php | 4 ++-- src/Resources/Files.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MsGraphAdmin.php b/src/MsGraphAdmin.php index 2e94ad5..2fd8b23 100644 --- a/src/MsGraphAdmin.php +++ b/src/MsGraphAdmin.php @@ -162,9 +162,9 @@ public function __call(string $function, array $args): mixed } } - protected function isJson(object|string $data): bool + protected function isJson(string $data): bool { - return is_string($data) && is_array(json_decode($data, true)) && (json_last_error() == JSON_ERROR_NONE); + return is_array(json_decode($data, true)) && (json_last_error() == JSON_ERROR_NONE); } /** diff --git a/src/Resources/Files.php b/src/Resources/Files.php index 89f36f9..9347876 100644 --- a/src/Resources/Files.php +++ b/src/Resources/Files.php @@ -10,8 +10,8 @@ class Files extends MsGraph public function getFiles(string $path = '', string $type = 'me'): array { $path = blank($path) - ? $type . '/drive/root/children?$orderby=name%20asc' - : $type . '/drive/root:' . $this->forceStartingSlash($path) . ':/children'; + ? $type.'/drive/root/children?$orderby=name%20asc' + : $type.'/drive/root:'.$this->forceStartingSlash($path).':/children'; if (is_array($msGraph = MsGraph::get($path))) { return $msGraph;