mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Service configs can be null
This commit is contained in:
parent
8638c229a8
commit
6eae3b53a2
5 changed files with 8 additions and 8 deletions
|
@ -129,5 +129,5 @@ abstract class ApiClient
|
|||
|
||||
abstract public function getSecret(): ?string;
|
||||
|
||||
abstract public function getEndpoint(): string;
|
||||
abstract public function getEndpoint(): ?string;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace App\Services;
|
|||
|
||||
interface ApiConsumerInterface
|
||||
{
|
||||
public function getEndpoint(): string;
|
||||
public function getEndpoint(): ?string;
|
||||
|
||||
public function getKey(): ?string;
|
||||
|
||||
|
|
|
@ -320,17 +320,17 @@ class LastfmService extends ApiClient implements ApiConsumerInterface
|
|||
return trim(str_replace('Read more on Last.fm', '', nl2br(strip_tags(html_entity_decode($str)))));
|
||||
}
|
||||
|
||||
public function getKey(): string
|
||||
public function getKey(): ?string
|
||||
{
|
||||
return config('koel.lastfm.key');
|
||||
}
|
||||
|
||||
public function getEndpoint(): string
|
||||
public function getEndpoint(): ?string
|
||||
{
|
||||
return config('koel.lastfm.endpoint');
|
||||
}
|
||||
|
||||
public function getSecret(): string
|
||||
public function getSecret(): ?string
|
||||
{
|
||||
return config('koel.lastfm.secret');
|
||||
}
|
||||
|
|
|
@ -58,12 +58,12 @@ class YouTubeService extends ApiClient implements ApiConsumerInterface
|
|||
});
|
||||
}
|
||||
|
||||
public function getEndpoint(): string
|
||||
public function getEndpoint(): ?string
|
||||
{
|
||||
return config('koel.youtube.endpoint');
|
||||
}
|
||||
|
||||
public function getKey(): string
|
||||
public function getKey(): ?string
|
||||
{
|
||||
return config('koel.youtube.key');
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class iTunesService extends ApiClient implements ApiConsumerInterface
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getEndpoint(): string
|
||||
public function getEndpoint(): ?string
|
||||
{
|
||||
return config('koel.itunes.endpoint');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue