Skip to content

Commit

Permalink
PHP Linting (Pint)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreia authored and github-actions[bot] committed Aug 21, 2023
1 parent b86403e commit 0281d77
Show file tree
Hide file tree
Showing 29 changed files with 93 additions and 138 deletions.
10 changes: 3 additions & 7 deletions src/DolbyApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
namespace DolbyApi;

use DolbyApi\Exceptions\ApiTypeException;
use Generator;
use Saloon\Http\Connector;
use Saloon\Contracts\Request;
use DolbyApi\Responses\DolbyResponse;
use DolbyApi\Resource\MediaApiResource;
use DolbyApi\Responses\DolbyResponse;
use Saloon\Http\Connector;

class DolbyApi extends Connector
{
Expand All @@ -27,8 +25,6 @@ public function __construct(string $token)

/**
* Resolve the base URL of the service.
*
* @return string
*/
public function resolveBaseUrl(): string
{
Expand Down Expand Up @@ -62,7 +58,7 @@ protected function defaultConfig(): array

public function api(string $apiType): MediaApiResource
{
return match($apiType) {
return match ($apiType) {
'media' => new MediaApiResource($this),
default => throw new ApiTypeException(sprintf('The %s API type is invalid', $apiType)),
};
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetAnalyzeMusicStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class GetAnalyzeMusicStatus extends Request
{
/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::GET;

public function __construct(
protected string $jobId,
){}
) {
}

protected function defaultQuery(): array
{
Expand All @@ -33,8 +32,6 @@ protected function defaultQuery(): array
* For a given job_id, this method will check if the processing task has completed.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-music-get
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetAnalyzeSpeechStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class GetAnalyzeSpeechStatus extends Request
{
/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::GET;

public function __construct(
protected string $jobId,
){}
) {
}

protected function defaultQuery(): array
{
Expand All @@ -33,8 +32,6 @@ protected function defaultQuery(): array
* For a given job_id, this method will check if the processing task has completed.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetAnalyzeStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class GetAnalyzeStatus extends Request
{
/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::GET;

public function __construct(
protected string $jobId,
){}
) {
}

protected function defaultQuery(): array
{
Expand All @@ -33,8 +32,6 @@ protected function defaultQuery(): array
* For a given job_id, this method will check if the processing task has completed.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-get
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetDiagnoseStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class GetDiagnoseStatus extends Request
{
/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::GET;

public function __construct(
protected string $jobId,
){}
) {
}

protected function defaultQuery(): array
{
Expand All @@ -33,8 +32,6 @@ protected function defaultQuery(): array
* For a given job_id, this method will check if the processing task has completed.
*
* @see https://docs.dolby.io/media-apis/reference/media-diagnose-get
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetDownloadUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ class GetDownloadUrl extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $url,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -37,8 +36,6 @@ protected function defaultBody(): array
* Download media you previously uploaded with /media/input or media that was generated through another Dolby Media API.
*
* @see https://docs.dolby.io/media-apis/reference/media-output-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetEnhanceStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class GetEnhanceStatus extends Request
{
/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::GET;

public function __construct(
protected string $jobId,
){}
) {
}

protected function defaultQuery(): array
{
Expand All @@ -33,8 +32,6 @@ protected function defaultQuery(): array
* For a given job_id, this method will check if the processing task has completed.
*
* @see https://docs.dolby.io/media-apis/reference/media-enhance-get
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/GetUploadUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ class GetUploadUrl extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $url,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -37,8 +36,6 @@ protected function defaultBody(): array
* Return a pre-signed url you can use to PUT and upload your media file.
*
* @see https://docs.dolby.io/media-apis/reference/media-input-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/StartAnalyze.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class StartAnalyze extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

Expand All @@ -25,7 +23,8 @@ public function __construct(
protected string $output,
protected array $loudness,
protected array $content,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -43,8 +42,6 @@ protected function defaultBody(): array
* Start analyzing to learn about your media.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/StartAnalyzeMusic.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ class StartAnalyzeMusic extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $input,
protected string $output,
protected array $onComplete,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -41,8 +40,6 @@ protected function defaultBody(): array
* Start analyzing to learn about music in your media.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-music-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/StartAnalyzeSpeech.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ class StartAnalyzeSpeech extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $input,
protected string $output,
protected array $onComplete,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -41,8 +40,6 @@ protected function defaultBody(): array
* Start analyzing to learn about speech in your media.
*
* @see https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/StartDiagnose.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ class StartDiagnose extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $input,
protected array $content,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -39,8 +38,6 @@ protected function defaultBody(): array
* Quick diagnosis for discovering audio quality issues with your media.
*
* @see https://docs.dolby.io/media-apis/reference/media-diagnose-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
7 changes: 2 additions & 5 deletions src/Requests/MediaApi/StartEnhance.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ class StartEnhance extends Request implements HasBody

/**
* HTTP Method
*
* @var Method
*/
protected Method $method = Method::POST;

public function __construct(
protected string $input,
protected string $output,
){}
) {
}

protected function defaultBody(): array
{
Expand All @@ -39,8 +38,6 @@ protected function defaultBody(): array
* Start enhancing to improve your media.
*
* @see https://docs.dolby.io/media-apis/reference/media-enhance-post
*
* @return string
*/
public function resolveEndpoint(): string
{
Expand Down
4 changes: 1 addition & 3 deletions src/Resource/CommunicationApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace DolbyApi\Resource;

use DolbyApi\Responses\DolbyResponse as Response;

class CommunicationApiResource extends Resource
{
// todo
// todo
}
Loading

0 comments on commit 0281d77

Please sign in to comment.