Repository: appwrite/appwrite
File: src/Appwrite/Platform/Modules/Functions/Http/Deployments/Builds/Download/Get.php (PHP)

Code before:
use Utopia\Platform\Scope\HTTP;
use Utopia\Storage\Device;
use Utopia\Swoole\Request;

class Get extends Action
{
    use HTTP;

    public static function getName()
    {
        return 'getDeploymentBuildDownload';
    }

    public function __construct()
    {
        $this
            ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET)
            ->setHttpPath('/v1/functions/:functionId/deployments/:deploymentId/build/download')
            ->desc('Download build')
            ->groups(['api', 'functions'])
            ->label('scope', 'functions.read')
            ->label('sdk', new Method(
                namespace: 'functions',
                name: 'getDeploymentBuildDownload',
                description: <<<EOT
                Get a site build content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
                EOT,
                auth: [AuthType::KEY, AuthType::JWT],
                responses: [
                    new SDKResponse(
                        code: Response::STATUS_CODE_OK,
                        model: Response::MODEL_NONE
                    )
                ],
                type: MethodType::LOCATION,
                contentType: ContentType::ANY,
            ))
            ->param('functionId', '', new UID(), 'Function ID.')
            ->param('deploymentId', '', new UID(), 'Deployment ID.')
            ->inject('response')
            ->inject('request')
            ->inject('dbForProject')
            ->inject('deviceForBuilds')
            ->callback([$this, 'action']);
    }

    public function action(string $functionId, string $deploymentId, Response $response, Request $request, Database $dbForProject, Device $deviceForBuilds)
    {
        $function = $dbForProject->getDocument('functions', $functionId);
        if ($function->isEmpty()) {
            throw new Exception(Exception::FUNCTION_NOT_FOUND);

Review comment (suggestion):
```suggestion
                Get a function build content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
```

Code after:
use Utopia\Platform\Scope\HTTP;
use Utopia\Storage\Device;
use Utopia\Swoole\Request;

class Get extends Action
{
    use HTTP;

    public static function getName()
    {
        return 'getDeploymentBuildDownload';
    }

    public function __construct()
    {
        $this
            ->setHttpMethod(Action::HTTP_REQUEST_METHOD_GET)
            ->setHttpPath('/v1/functions/:functionId/deployments/:deploymentId/build/download')
            ->desc('Download build')
            ->groups(['api', 'functions'])
            ->label('scope', 'functions.read')
            ->label('sdk', new Method(
                namespace: 'functions',
                name: 'getDeploymentBuildDownload',
                description: <<<EOT
                Get a function build content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
                EOT,
                auth: [AuthType::KEY, AuthType::JWT],
                responses: [
                    new SDKResponse(
                        code: Response::STATUS_CODE_OK,
                        model: Response::MODEL_NONE
                    )
                ],
                type: MethodType::LOCATION,
                contentType: ContentType::ANY,
            ))
            ->param('functionId', '', new UID(), 'Function ID.')
            ->param('deploymentId', '', new UID(), 'Deployment ID.')
            ->inject('response')
            ->inject('request')
            ->inject('dbForProject')
            ->inject('deviceForBuilds')
            ->callback([$this, 'action']);
    }

    public function action(string $functionId, string $deploymentId, Response $response, Request $request, Database $dbForProject, Device $deviceForBuilds)
    {
        $function = $dbForProject->getDocument('functions', $functionId);
        if ($function->isEmpty()) {
            throw new Exception(Exception::FUNCTION_NOT_FOUND);