mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Apply fixes from StyleCI (#778)
This commit is contained in:
parent
67357316bc
commit
6181041331
6 changed files with 4 additions and 9 deletions
|
@ -13,7 +13,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Lastfm;
|
||||
use YouTube;
|
||||
|
||||
/**
|
||||
* @property string path
|
||||
|
|
|
@ -54,7 +54,7 @@ abstract class ApiClient
|
|||
public function request($verb, $uri, $appendKey = true, array $params = [])
|
||||
{
|
||||
try {
|
||||
$body = (string)$this->getClient()
|
||||
$body = (string) $this->getClient()
|
||||
->$verb($this->buildUrl($uri, $appendKey), ['form_params' => $params])
|
||||
->getBody();
|
||||
|
||||
|
@ -110,14 +110,14 @@ abstract class ApiClient
|
|||
$uri = "/$uri";
|
||||
}
|
||||
|
||||
$uri = $this->getEndpoint() . $uri;
|
||||
$uri = $this->getEndpoint().$uri;
|
||||
}
|
||||
|
||||
if ($appendKey) {
|
||||
if (parse_url($uri, PHP_URL_QUERY)) {
|
||||
$uri .= "&{$this->keyParam}=" . $this->getKey();
|
||||
$uri .= "&{$this->keyParam}=".$this->getKey();
|
||||
} else {
|
||||
$uri .= "?{$this->keyParam}=" . $this->getKey();
|
||||
$uri .= "?{$this->keyParam}=".$this->getKey();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
interface ApiConsumerInterface
|
||||
{
|
||||
/** @return string */
|
||||
|
|
|
@ -78,6 +78,5 @@ class YouTubeService extends ApiClient implements ApiConsumerInterface
|
|||
/** @return string|null */
|
||||
public function getSecret()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ use Cache;
|
|||
use Lastfm;
|
||||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use YouTube;
|
||||
|
||||
class SongTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -13,7 +13,6 @@ class ConcreteApiClient extends ApiClient
|
|||
|
||||
public function getSecret()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getEndpoint()
|
||||
|
|
Loading…
Reference in a new issue