mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-14 03:42:41 +09:00
Update to laravel 7
This commit is contained in:
@@ -21,12 +21,12 @@ class Blobs extends AbstractApi
|
||||
*
|
||||
* @param string|null $bodyType
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function configure($bodyType = null)
|
||||
{
|
||||
if ('raw' === $bodyType) {
|
||||
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.raw', $this->client->getApiVersion());
|
||||
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.raw', $this->getApiVersion());
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -43,9 +43,7 @@ class Blobs extends AbstractApi
|
||||
*/
|
||||
public function show($username, $repository, $sha)
|
||||
{
|
||||
$response = $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha));
|
||||
|
||||
return $response;
|
||||
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,22 @@ class References extends AbstractApi
|
||||
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all matching references for the supplied reference name.
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $repository
|
||||
* @param string $reference
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function matching(string $username, string $repository, string $reference): array
|
||||
{
|
||||
$reference = $this->encodeReference($reference);
|
||||
|
||||
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/matching-refs/'.$reference);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all branches of a repository.
|
||||
*
|
||||
|
||||
@@ -56,11 +56,7 @@ class Tags extends AbstractApi
|
||||
throw new MissingArgumentException(['tag', 'message', 'object', 'type']);
|
||||
}
|
||||
|
||||
if (!isset($params['tagger'])) {
|
||||
throw new MissingArgumentException('tagger');
|
||||
}
|
||||
|
||||
if (!isset($params['tagger']['name'], $params['tagger']['email'], $params['tagger']['date'])) {
|
||||
if (isset($params['tagger']) && !isset($params['tagger']['name'], $params['tagger']['email'], $params['tagger']['date'])) {
|
||||
throw new MissingArgumentException(['tagger.name', 'tagger.email', 'tagger.date']);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class Trees extends AbstractApi
|
||||
}
|
||||
|
||||
// If `sha` is not set, `content` is required
|
||||
if (!isset($tree['sha']) && !isset($tree['content'])) {
|
||||
if (!array_key_exists('sha', $tree) && !isset($tree['content'])) {
|
||||
throw new MissingArgumentException("tree.$key.content");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user