Skip to content

Commit 7874640

Browse files
committed
phpstan errors
1 parent f9559c7 commit 7874640

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Adapters/Facebook/OEmbed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class OEmbed extends Base
1212
const ENDPOINT_POST = 'https://graph.facebook.com/v25.0/oembed_post';
1313
const ENDPOINT_VIDEO = 'https://graph.facebook.com/v25.0/oembed_video';
1414

15-
protected function detectEndpoint(): ?UriInterface
15+
protected function detectEndpoint(): UriInterface
1616
{
1717
$token = $this->extractor->getSetting('facebook:token');
1818

@@ -24,7 +24,7 @@ protected function detectEndpoint(): ?UriInterface
2424
}
2525
}
2626
$queryParameters = $this->getOembedQueryParameters((string) $uri);
27-
if($token) $queryParameters['access_token'] = $token;
27+
if(!empty($token)) $queryParameters['access_token'] = $token;
2828

2929
return $this->extractor->getCrawler()
3030
->createUri($this->getEndpointByPath($uri->getPath()))

src/Adapters/Instagram/OEmbed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class OEmbed extends Base
1010
{
1111
const ENDPOINT = 'https://graph.facebook.com/v25.0/instagram_oembed';
1212

13-
protected function detectEndpoint(): ?UriInterface
13+
protected function detectEndpoint(): UriInterface
1414
{
1515
$token = $this->extractor->getSetting('instagram:token');
1616

@@ -20,7 +20,7 @@ protected function detectEndpoint(): ?UriInterface
2020
}
2121

2222
$queryParameters = $this->getOembedQueryParameters((string) $uri);
23-
if($token) $queryParameters['access_token'] = $token;
23+
if(!empty($token)) $queryParameters['access_token'] = $token;
2424

2525
return $this->extractor->getCrawler()
2626
->createUri(self::ENDPOINT)

0 commit comments

Comments
 (0)