From f48561cf9f393c626a8a157b5d6048676c6bd0b1 Mon Sep 17 00:00:00 2001 From: Lewis Larsen Date: Tue, 20 Aug 2024 09:09:23 +0100 Subject: [PATCH] ran pint --- src/Actions/ManagesBackupDestinations.php | 1 + src/Actions/ManagesBackupTaskLogs.php | 1 + src/Actions/ManagesBackupTasks.php | 1 + src/Actions/ManagesNotificationStreams.php | 1 + src/Actions/ManagesRemoteServers.php | 1 + src/Actions/ManagesTags.php | 1 + src/MakesHttpRequests.php | 12 ------------ src/VanguardClient.php | 13 ++----------- 8 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/Actions/ManagesBackupDestinations.php b/src/Actions/ManagesBackupDestinations.php index fcf0567..04246d0 100644 --- a/src/Actions/ManagesBackupDestinations.php +++ b/src/Actions/ManagesBackupDestinations.php @@ -13,6 +13,7 @@ trait ManagesBackupDestinations * Get the collection of backup destinations. * * @return BackupDestination[] + * * @throws Exception */ public function backupDestinations(): array diff --git a/src/Actions/ManagesBackupTaskLogs.php b/src/Actions/ManagesBackupTaskLogs.php index 7e53e46..be02dca 100644 --- a/src/Actions/ManagesBackupTaskLogs.php +++ b/src/Actions/ManagesBackupTaskLogs.php @@ -12,6 +12,7 @@ trait ManagesBackupTaskLogs * Get the collection of backup task logs. * * @return BackupTaskLog[] + * * @throws \Exception */ public function backupTaskLogs(array $query = []): array diff --git a/src/Actions/ManagesBackupTasks.php b/src/Actions/ManagesBackupTasks.php index 3ef8ef4..02b1b77 100644 --- a/src/Actions/ManagesBackupTasks.php +++ b/src/Actions/ManagesBackupTasks.php @@ -13,6 +13,7 @@ trait ManagesBackupTasks * Get the collection of backup tasks. * * @return BackupTask[] + * * @throws Exception */ public function backupTasks(): array diff --git a/src/Actions/ManagesNotificationStreams.php b/src/Actions/ManagesNotificationStreams.php index bff0137..9a35a3c 100644 --- a/src/Actions/ManagesNotificationStreams.php +++ b/src/Actions/ManagesNotificationStreams.php @@ -13,6 +13,7 @@ trait ManagesNotificationStreams * Get the collection of notification streams. * * @return NotificationStream[] + * * @throws Exception */ public function notificationStreams(): array diff --git a/src/Actions/ManagesRemoteServers.php b/src/Actions/ManagesRemoteServers.php index 0ce6af4..61a99b4 100644 --- a/src/Actions/ManagesRemoteServers.php +++ b/src/Actions/ManagesRemoteServers.php @@ -13,6 +13,7 @@ trait ManagesRemoteServers * Get the collection of remote servers. * * @return RemoteServer[] + * * @throws Exception */ public function remoteServers(): array diff --git a/src/Actions/ManagesTags.php b/src/Actions/ManagesTags.php index f0e1fa9..cd5e8b9 100644 --- a/src/Actions/ManagesTags.php +++ b/src/Actions/ManagesTags.php @@ -13,6 +13,7 @@ trait ManagesTags * Get the collection of tags. * * @return Tag[] + * * @throws Exception */ public function tags(): array diff --git a/src/MakesHttpRequests.php b/src/MakesHttpRequests.php index 25180ee..39141dc 100644 --- a/src/MakesHttpRequests.php +++ b/src/MakesHttpRequests.php @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/VanguardClient.php b/src/VanguardClient.php index 35ee0af..d839c11 100644 --- a/src/VanguardClient.php +++ b/src/VanguardClient.php @@ -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); @@ -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 { @@ -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;