Skip to content

Commit

Permalink
removed object type hint from isJson function argument type in MsGr…
Browse files Browse the repository at this point in the history
…aphAdmin
  • Loading branch information
dcblogdev committed May 12, 2024
1 parent b2c2dbb commit f56df5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/MsGraphAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f56df5f

Please sign in to comment.