From c1a340ab12503594d372c16f3152c359b34e27b5 Mon Sep 17 00:00:00 2001 From: Arnold Cubici-Jones Date: Fri, 11 Oct 2024 10:44:49 +0100 Subject: [PATCH] feat(repo): Add more descriptive docblocks --- src/Urlbox.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Urlbox.php b/src/Urlbox.php index dc2a50d..c2c86af 100644 --- a/src/Urlbox.php +++ b/src/Urlbox.php @@ -36,6 +36,8 @@ public function __construct( string $apiKey, string $apiSecret, ?string $webhook } /** + * Ensure the user has passed an API key and secret. + * * @param string $apiKey * @param string $apiSecret * @@ -55,6 +57,8 @@ private function ensureIsValidCredentials( string $apiKey, string $apiSecret ) } /** + * Returns a new instance of Urlbox + * * @param string $apiKey * @param string $apiSecret * @param string|null $webhookSecret @@ -69,8 +73,9 @@ public static function fromCredentials( string $apiKey, string $apiSecret, ?stri } /** + * Calls the Urlbox /sync endpoint * @param array $options - * @param string|null $saveToDiskPath + * @param string|null $saveToDiskPath - A path to save the image to * * @return array{renderUrl: string, size: int, localPath: string} * @throws GuzzleException @@ -89,8 +94,9 @@ public function render( array $options, ?string $saveToDiskPath = null ): array } /** - * @param string $endpoint - * @param array $options + * Make a POST request to Urlbox + * @param string $endpoint - The endpoint EG /sync + * @param array $options - The render options * * @return array{renderUrl: string, size: int} * @throws GuzzleException