Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -2,8 +2,10 @@
namespace Github\Api;
use Github\Api\Organization\Actions\Secrets;
use Github\Api\Organization\Hooks;
use Github\Api\Organization\Members;
use Github\Api\Organization\OutsideCollaborators;
use Github\Api\Organization\Teams;
/**
@@ -53,15 +55,27 @@ class Organization extends AbstractApi
* @param string $organization the user name
* @param string $type the type of repositories
* @param int $page the page
* @param string $sort sort by
* @param string $direction direction of sort, asc or desc
*
* @return array the repositories
*/
public function repositories($organization, $type = 'all', $page = 1)
public function repositories($organization, $type = 'all', $page = 1, $sort = null, $direction = null)
{
return $this->get('/orgs/'.rawurlencode($organization).'/repos', [
$parameters = [
'type' => $type,
'page' => $page,
]);
];
if ($sort !== null) {
$parameters['sort'] = $sort;
}
if ($direction !== null) {
$parameters['direction'] = $direction;
}
return $this->get('/orgs/'.rawurlencode($organization).'/repos', $parameters);
}
/**
@@ -69,7 +83,7 @@ class Organization extends AbstractApi
*/
public function members()
{
return new Members($this->client);
return new Members($this->getClient());
}
/**
@@ -77,7 +91,7 @@ class Organization extends AbstractApi
*/
public function hooks()
{
return new Hooks($this->client);
return new Hooks($this->getClient());
}
/**
@@ -85,7 +99,23 @@ class Organization extends AbstractApi
*/
public function teams()
{
return new Teams($this->client);
return new Teams($this->getClient());
}
/**
* @return Secrets
*/
public function secrets(): Secrets
{
return new Secrets($this->getClient());
}
/**
* @return OutsideCollaborators
*/
public function outsideCollaborators()
{
return new OutsideCollaborators($this->getClient());
}
/**