Skip to content

Commit

Permalink
Fixes coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
supun-io authored and github-actions[bot] committed Oct 21, 2024
1 parent 66f1cb5 commit e12282b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/UnfoldConfigObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public function __construct(
public ?string $facebookAccessToken = null,

// CACHE
)
{
) {
$this->setHttpClient($httpClient);
}

Expand Down
18 changes: 11 additions & 7 deletions tests/Unit/EmbedParsers/OEmbedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

class OEmbedTestPlatform extends EmbedParserAbstract implements EmbedParserOEmbedInterface
{

public function regex()
{
return [
Expand Down Expand Up @@ -56,7 +55,8 @@ public function oEmbedUrl(): ?string
$client = new Client(['handler' => $handlerStack]);

$platform = new OEmbedTestPlatform(
'https://hyvor.com/123', new UnfoldConfigObject(
'https://hyvor.com/123',
new UnfoldConfigObject(
httpClient: $client
)
);
Expand Down Expand Up @@ -110,7 +110,8 @@ public function oEmbedUrl(): ?string
$client = new Client(['handler' => $handlerStack]);

$platform = new OEmbedTestPlatform(
'https://hyvor.com/123', new UnfoldConfigObject(
'https://hyvor.com/123',
new UnfoldConfigObject(
httpClient: $client
)
);
Expand All @@ -135,7 +136,8 @@ public function oEmbedUrl(): ?string
$client = new Client(['handler' => $handlerStack]);

$platform = new OEmbedTestPlatform(
'https://hyvor.com/123', new UnfoldConfigObject(
'https://hyvor.com/123',
new UnfoldConfigObject(
httpClient: $client
)
);
Expand All @@ -160,7 +162,8 @@ public function oEmbedUrl(): ?string
$client = new Client(['handler' => $handlerStack]);

$platform = new OEmbedTestPlatform(
'https://hyvor.com/123', new UnfoldConfigObject(
'https://hyvor.com/123',
new UnfoldConfigObject(
httpClient: $client
)
);
Expand All @@ -185,7 +188,8 @@ public function oEmbedUrl(): ?string
$client = new Client(['handler' => $handlerStack]);

$platform = new OEmbedTestPlatform(
'https://hyvor.com/123', new UnfoldConfigObject(
'https://hyvor.com/123',
new UnfoldConfigObject(
httpClient: $client
)
);
Expand All @@ -199,4 +203,4 @@ public function oEmbedUrl(): ?string

expect($exception)->toBeInstanceOf(ParserException::class);
expect($exception->getMessage())->toBe('Failed to parse JSON response from oEmbed endpoint');
});
});
2 changes: 1 addition & 1 deletion tests/Unit/RedirectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

$response = $config->httpClient->sendRequest($request);
dd($response);
})->skip();
})->skip();

0 comments on commit e12282b

Please sign in to comment.