mirror of
https://github.com/koel/koel
synced 2025-02-17 13:58:28 +00:00
Apply fixes from StyleCI (#799)
This commit is contained in:
parent
d88dd79f15
commit
40d4174d04
7 changed files with 11 additions and 10 deletions
|
@ -4,8 +4,8 @@ namespace App\Services;
|
|||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use Illuminate\Log\Logger;
|
||||
use Illuminate\Contracts\Cache\Repository as Cache;
|
||||
use Illuminate\Log\Logger;
|
||||
use InvalidArgumentException;
|
||||
use SimpleXMLElement;
|
||||
|
||||
|
@ -71,7 +71,7 @@ abstract class ApiClient
|
|||
} catch (ClientException $e) {
|
||||
$this->logger->error($e);
|
||||
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ namespace App\Services;
|
|||
interface ApiConsumerInterface
|
||||
{
|
||||
public function getEndpoint(): ?string;
|
||||
|
||||
public function getKey(): ?string;
|
||||
|
||||
public function getSecret(): ?string;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class YouTubeService extends ApiClient implements ApiConsumerInterface
|
|||
public function search(string $q, string $pageToken = '', int $perPage = 10)
|
||||
{
|
||||
if (!$this->enabled()) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
|
||||
$uri = sprintf('search?part=snippet&type=video&maxResults=%s&pageToken=%s&q=%s',
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace Tests;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel as Artisan;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
||||
|
|
|
@ -56,28 +56,28 @@ abstract class TestCase extends BaseTestCase
|
|||
protected function getAsUser($url, $user = null): self
|
||||
{
|
||||
return $this->get($url, [
|
||||
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
|
||||
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function deleteAsUser($url, $data = [], $user = null): self
|
||||
{
|
||||
return $this->delete($url, $data, [
|
||||
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
|
||||
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function postAsUser($url, $data, $user = null): self
|
||||
{
|
||||
return $this->post($url, $data, [
|
||||
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
|
||||
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function putAsUser($url, $data, $user = null): self
|
||||
{
|
||||
return $this->put($url, $data, [
|
||||
'Authorization' => 'Bearer ' . $this->generateJwtToken($user),
|
||||
'Authorization' => 'Bearer '.$this->generateJwtToken($user),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ use App\Services\Streamers\TranscodingStreamer;
|
|||
use App\Services\Streamers\XAccelRedirectStreamer;
|
||||
use App\Services\Streamers\XSendFileStreamer;
|
||||
use App\Services\TranscodingService;
|
||||
use Tests\TestCase;
|
||||
use phpmock\mockery\PHPMockery;
|
||||
use Tests\TestCase;
|
||||
|
||||
class StreamerFactoryTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ class ApiClientTest extends TestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
/**
|
||||
/*
|
||||
* @var Client client
|
||||
* @var Cache cache
|
||||
* @var Logger logger
|
||||
|
|
Loading…
Add table
Reference in a new issue