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;