Skip to content

Commit

Permalink
feat(repo): Add more descriptive docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
AJCJ1 committed Oct 11, 2024
1 parent b756f71 commit c1a340a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Urlbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c1a340a

Please sign in to comment.