Skip to content

Commit 0281d77

Browse files
andreiagithub-actions[bot]
authored andcommitted
PHP Linting (Pint)
1 parent b86403e commit 0281d77

29 files changed

+93
-138
lines changed

src/DolbyApi.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
namespace DolbyApi;
66

77
use DolbyApi\Exceptions\ApiTypeException;
8-
use Generator;
9-
use Saloon\Http\Connector;
10-
use Saloon\Contracts\Request;
11-
use DolbyApi\Responses\DolbyResponse;
128
use DolbyApi\Resource\MediaApiResource;
9+
use DolbyApi\Responses\DolbyResponse;
10+
use Saloon\Http\Connector;
1311

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

2826
/**
2927
* Resolve the base URL of the service.
30-
*
31-
* @return string
3228
*/
3329
public function resolveBaseUrl(): string
3430
{
@@ -62,7 +58,7 @@ protected function defaultConfig(): array
6258

6359
public function api(string $apiType): MediaApiResource
6460
{
65-
return match($apiType) {
61+
return match ($apiType) {
6662
'media' => new MediaApiResource($this),
6763
default => throw new ApiTypeException(sprintf('The %s API type is invalid', $apiType)),
6864
};

src/Requests/MediaApi/GetAnalyzeMusicStatus.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class GetAnalyzeMusicStatus extends Request
1111
{
1212
/**
1313
* HTTP Method
14-
*
15-
* @var Method
1614
*/
1715
protected Method $method = Method::GET;
1816

1917
public function __construct(
2018
protected string $jobId,
21-
){}
19+
) {
20+
}
2221

2322
protected function defaultQuery(): array
2423
{
@@ -33,8 +32,6 @@ protected function defaultQuery(): array
3332
* For a given job_id, this method will check if the processing task has completed.
3433
*
3534
* @see https://docs.dolby.io/media-apis/reference/media-analyze-music-get
36-
*
37-
* @return string
3835
*/
3936
public function resolveEndpoint(): string
4037
{

src/Requests/MediaApi/GetAnalyzeSpeechStatus.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class GetAnalyzeSpeechStatus extends Request
1111
{
1212
/**
1313
* HTTP Method
14-
*
15-
* @var Method
1614
*/
1715
protected Method $method = Method::GET;
1816

1917
public function __construct(
2018
protected string $jobId,
21-
){}
19+
) {
20+
}
2221

2322
protected function defaultQuery(): array
2423
{
@@ -33,8 +32,6 @@ protected function defaultQuery(): array
3332
* For a given job_id, this method will check if the processing task has completed.
3433
*
3534
* @see https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
36-
*
37-
* @return string
3835
*/
3936
public function resolveEndpoint(): string
4037
{

src/Requests/MediaApi/GetAnalyzeStatus.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class GetAnalyzeStatus extends Request
1111
{
1212
/**
1313
* HTTP Method
14-
*
15-
* @var Method
1614
*/
1715
protected Method $method = Method::GET;
1816

1917
public function __construct(
2018
protected string $jobId,
21-
){}
19+
) {
20+
}
2221

2322
protected function defaultQuery(): array
2423
{
@@ -33,8 +32,6 @@ protected function defaultQuery(): array
3332
* For a given job_id, this method will check if the processing task has completed.
3433
*
3534
* @see https://docs.dolby.io/media-apis/reference/media-analyze-get
36-
*
37-
* @return string
3835
*/
3936
public function resolveEndpoint(): string
4037
{

src/Requests/MediaApi/GetDiagnoseStatus.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class GetDiagnoseStatus extends Request
1111
{
1212
/**
1313
* HTTP Method
14-
*
15-
* @var Method
1614
*/
1715
protected Method $method = Method::GET;
1816

1917
public function __construct(
2018
protected string $jobId,
21-
){}
19+
) {
20+
}
2221

2322
protected function defaultQuery(): array
2423
{
@@ -33,8 +32,6 @@ protected function defaultQuery(): array
3332
* For a given job_id, this method will check if the processing task has completed.
3433
*
3534
* @see https://docs.dolby.io/media-apis/reference/media-diagnose-get
36-
*
37-
* @return string
3835
*/
3936
public function resolveEndpoint(): string
4037
{

src/Requests/MediaApi/GetDownloadUrl.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ class GetDownloadUrl extends Request implements HasBody
1515

1616
/**
1717
* HTTP Method
18-
*
19-
* @var Method
2018
*/
2119
protected Method $method = Method::POST;
2220

2321
public function __construct(
2422
protected string $url,
25-
){}
23+
) {
24+
}
2625

2726
protected function defaultBody(): array
2827
{
@@ -37,8 +36,6 @@ protected function defaultBody(): array
3736
* Download media you previously uploaded with /media/input or media that was generated through another Dolby Media API.
3837
*
3938
* @see https://docs.dolby.io/media-apis/reference/media-output-post
40-
*
41-
* @return string
4239
*/
4340
public function resolveEndpoint(): string
4441
{

src/Requests/MediaApi/GetEnhanceStatus.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class GetEnhanceStatus extends Request
1111
{
1212
/**
1313
* HTTP Method
14-
*
15-
* @var Method
1614
*/
1715
protected Method $method = Method::GET;
1816

1917
public function __construct(
2018
protected string $jobId,
21-
){}
19+
) {
20+
}
2221

2322
protected function defaultQuery(): array
2423
{
@@ -33,8 +32,6 @@ protected function defaultQuery(): array
3332
* For a given job_id, this method will check if the processing task has completed.
3433
*
3534
* @see https://docs.dolby.io/media-apis/reference/media-enhance-get
36-
*
37-
* @return string
3835
*/
3936
public function resolveEndpoint(): string
4037
{

src/Requests/MediaApi/GetUploadUrl.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ class GetUploadUrl extends Request implements HasBody
1515

1616
/**
1717
* HTTP Method
18-
*
19-
* @var Method
2018
*/
2119
protected Method $method = Method::POST;
2220

2321
public function __construct(
2422
protected string $url,
25-
){}
23+
) {
24+
}
2625

2726
protected function defaultBody(): array
2827
{
@@ -37,8 +36,6 @@ protected function defaultBody(): array
3736
* Return a pre-signed url you can use to PUT and upload your media file.
3837
*
3938
* @see https://docs.dolby.io/media-apis/reference/media-input-post
40-
*
41-
* @return string
4239
*/
4340
public function resolveEndpoint(): string
4441
{

src/Requests/MediaApi/StartAnalyze.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class StartAnalyze extends Request implements HasBody
1515

1616
/**
1717
* HTTP Method
18-
*
19-
* @var Method
2018
*/
2119
protected Method $method = Method::POST;
2220

@@ -25,7 +23,8 @@ public function __construct(
2523
protected string $output,
2624
protected array $loudness,
2725
protected array $content,
28-
){}
26+
) {
27+
}
2928

3029
protected function defaultBody(): array
3130
{
@@ -43,8 +42,6 @@ protected function defaultBody(): array
4342
* Start analyzing to learn about your media.
4443
*
4544
* @see https://docs.dolby.io/media-apis/reference/media-analyze-post
46-
*
47-
* @return string
4845
*/
4946
public function resolveEndpoint(): string
5047
{

src/Requests/MediaApi/StartAnalyzeMusic.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ class StartAnalyzeMusic extends Request implements HasBody
1515

1616
/**
1717
* HTTP Method
18-
*
19-
* @var Method
2018
*/
2119
protected Method $method = Method::POST;
2220

2321
public function __construct(
2422
protected string $input,
2523
protected string $output,
2624
protected array $onComplete,
27-
){}
25+
) {
26+
}
2827

2928
protected function defaultBody(): array
3029
{
@@ -41,8 +40,6 @@ protected function defaultBody(): array
4140
* Start analyzing to learn about music in your media.
4241
*
4342
* @see https://docs.dolby.io/media-apis/reference/media-analyze-music-post
44-
*
45-
* @return string
4643
*/
4744
public function resolveEndpoint(): string
4845
{

0 commit comments

Comments
 (0)