Apply fixes from StyleCI (#778)

This commit is contained in:
Phan An 2018-08-19 13:13:29 +02:00 committed by GitHub
parent 67357316bc
commit 6181041331
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 9 deletions

View file

@ -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

View file

@ -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();
}
}

View file

@ -2,7 +2,6 @@
namespace App\Services;
interface ApiConsumerInterface
{
/** @return string */

View file

@ -78,6 +78,5 @@ class YouTubeService extends ApiClient implements ApiConsumerInterface
/** @return string|null */
public function getSecret()
{
return null;
}
}

View file

@ -9,7 +9,6 @@ use Cache;
use Lastfm;
use Mockery as m;
use Tests\TestCase;
use YouTube;
class SongTest extends TestCase
{

View file

@ -13,7 +13,6 @@ class ConcreteApiClient extends ApiClient
public function getSecret()
{
return null;
}
public function getEndpoint()