Skip to content

Commit

Permalink
ran pint
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislarsen committed Aug 20, 2024
1 parent e58baee commit f48561c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/Actions/ManagesBackupDestinations.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait ManagesBackupDestinations
* Get the collection of backup destinations.
*
* @return BackupDestination[]
*
* @throws Exception
*/
public function backupDestinations(): array
Expand Down
1 change: 1 addition & 0 deletions src/Actions/ManagesBackupTaskLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ trait ManagesBackupTaskLogs
* Get the collection of backup task logs.
*
* @return BackupTaskLog[]
*
* @throws \Exception
*/
public function backupTaskLogs(array $query = []): array
Expand Down
1 change: 1 addition & 0 deletions src/Actions/ManagesBackupTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait ManagesBackupTasks
* Get the collection of backup tasks.
*
* @return BackupTask[]
*
* @throws Exception
*/
public function backupTasks(): array
Expand Down
1 change: 1 addition & 0 deletions src/Actions/ManagesNotificationStreams.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait ManagesNotificationStreams
* Get the collection of notification streams.
*
* @return NotificationStream[]
*
* @throws Exception
*/
public function notificationStreams(): array
Expand Down
1 change: 1 addition & 0 deletions src/Actions/ManagesRemoteServers.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait ManagesRemoteServers
* Get the collection of remote servers.
*
* @return RemoteServer[]
*
* @throws Exception
*/
public function remoteServers(): array
Expand Down
1 change: 1 addition & 0 deletions src/Actions/ManagesTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trait ManagesTags
* Get the collection of tags.
*
* @return Tag[]
*
* @throws Exception
*/
public function tags(): array
Expand Down
12 changes: 0 additions & 12 deletions src/MakesHttpRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ trait MakesHttpRequests
/**
* Send a GET request to VanguardBackup API and return the response.
*
* @param string $uri
*
* @return mixed
* @throws GuzzleException
*/
public function get(string $uri): mixed
Expand All @@ -31,9 +29,6 @@ public function get(string $uri): mixed
/**
* Send a POST request to VanguardBackup API and return the response.
*
* @param string $uri
* @param array $payload
* @return mixed
* @throws GuzzleException
*/
public function post(string $uri, array $payload = []): mixed
Expand All @@ -44,9 +39,6 @@ public function post(string $uri, array $payload = []): mixed
/**
* Send a PUT request to VanguardBackup API and return the response.
*
* @param string $uri
* @param array $payload
* @return mixed
* @throws GuzzleException
*/
public function put(string $uri, array $payload = []): mixed
Expand All @@ -69,10 +61,6 @@ public function delete($uri, array $payload = []): mixed
/**
* Send a request to VanguardBackup API and return the response.
*
* @param string $method
* @param string $uri
* @param array $payload
* @return mixed
* @throws GuzzleException
*/
protected function request(string $method, string $uri, array $payload = []): mixed
Expand Down
13 changes: 2 additions & 11 deletions src/VanguardClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ class VanguardClient
/**
* Create a new VanguardClient instance.
*
* @param string|null $apiKey
* @param string|null $baseUrl
* @return void
*/
public function __construct(string $apiKey = null, string $baseUrl = null, ?HttpClient $httpClient = null)
public function __construct(?string $apiKey = null, ?string $baseUrl = null, ?HttpClient $httpClient = null)
{
if (! is_null($baseUrl)) {
$this->setBaseUrl($baseUrl);
Expand All @@ -57,11 +55,6 @@ public function __construct(string $apiKey = null, string $baseUrl = null, ?Http

/**
* Transform the items of the collection to the given class.
*
* @param array $collection
* @param string $class
* @param array $extraData
* @return array
*/
protected function transformCollection(array $collection, string $class, array $extraData = []): array
{
Expand All @@ -73,11 +66,9 @@ protected function transformCollection(array $collection, string $class, array $
/**
* Set the API key and set up the HTTP client.
*
* @param string $apiKey
* @param HttpClient|null $httpClient
* @return $this
*/
public function setApiKey(string $apiKey, HttpClient $httpClient = null): static
public function setApiKey(string $apiKey, ?HttpClient $httpClient = null): static
{
$this->apiKey = $apiKey;

Expand Down

0 comments on commit f48561c

Please sign in to comment.